Skip to content

Commit 40e1ef7

Browse files
committed
start working on blueprint discovery RFC
1 parent cc27969 commit 40e1ef7

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed

Diff for: text/0000-blueprint-discovery.md

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
stage: accepted
3+
start-date: 2024-12-24T00:00:00.000Z # In format YYYY-MM-DDT00:00:00.000Z
4+
release-date: # In format YYYY-MM-DDT00:00:00.000Z
5+
release-versions:
6+
teams: # delete teams that aren't relevant
7+
- cli
8+
- data
9+
- framework
10+
- learning
11+
prs:
12+
accepted: # Fill this in with the URL for the Proposal RFC PR
13+
project-link:
14+
suite:
15+
---
16+
17+
<!---
18+
Directions for above:
19+
20+
stage: Leave as is
21+
start-date: Fill in with today's date, 2032-12-01T00:00:00.000Z
22+
release-date: Leave as is
23+
release-versions: Leave as is
24+
teams: Include only the [team(s)](README.md#relevant-teams) for which this RFC applies
25+
prs:
26+
accepted: Fill this in with the URL for the Proposal RFC PR
27+
project-link: Leave as is
28+
suite: Leave as is
29+
-->
30+
31+
<-- Replace "RFC title" with the title of your RFC -->
32+
# v2 blueprint discovery protocol
33+
34+
## Summary
35+
36+
Since the beginning of ember-cli we have had blueprints available for developers to create new apps, new addons, and a number of different entities for your existing apps such as Components, Routes, Tests, etc. A lesser known feature of the blueprint system is how they are discovered, i.e. when you run `ember g component` how does ember-cli know how to find the addon that is providing that `component` blueprint.
37+
38+
This RFC intends to formalise the protocol that ember-cli uses to discover blueprints with a new protocol that will be a lot faster than the previous discovery process and more future proof. This RFC also proposes that we deprecate the old blueprint discovery process.
39+
40+
## Motivation
41+
42+
There are a number of motiviations for this RFC that i will go into in more detail in this section, but for now the main motivators are
43+
44+
- v2 addons have no way to provide blueprints TODO actually check this
45+
- blueprint generation can feel very slow
46+
- there is no clear way to disambiuate blueprints that are being provided by multiple addons
47+
48+
### Addon loading
49+
50+
To understand some of the challenges around blueprints loading we have to first understand some of the protocol that ember-cli uses to load addons (specifically non v2 addons). Whenever you run an ember-cli command that needs to have information about addons (such as `ember generate` or `ember serve`) ember-cli needs to go through the addon discovery process. This process can be very complicated but a simplified flow might be as follows:
51+
52+
TODO simplified flow of addon discovery
53+
54+
55+
56+
## Detailed design
57+
58+
> This is the bulk of the RFC.
59+
60+
> Explain the design in enough detail for somebody
61+
familiar with the framework to understand, and for somebody familiar with the
62+
implementation to implement. This should get into specifics and corner-cases,
63+
and include examples of how the feature is used. Any new terminology should be
64+
defined here.
65+
66+
> Please keep in mind any implications within the Ember ecosystem, such as:
67+
> - Lint rules (ember-template-lint, eslint-plugin-ember) that should be added, modified or removed
68+
> - Features that are replaced or made obsolete by this feature and should eventually be deprecated
69+
> - Ember Inspector and debuggability
70+
> - Server-side Rendering
71+
> - Ember Engines
72+
> - The Addon Ecosystem
73+
> - IDE Support
74+
> - Blueprints that should be added or modified
75+
76+
## How we teach this
77+
78+
> What names and terminology work best for these concepts and why? How is this
79+
idea best presented? As a continuation of existing Ember patterns, or as a
80+
wholly new one?
81+
82+
> Would the acceptance of this proposal mean the Ember guides must be
83+
re-organized or altered? Does it change how Ember is taught to new users
84+
at any level?
85+
86+
> How should this feature be introduced and taught to existing Ember
87+
users?
88+
89+
> Keep in mind the variety of learning materials: API docs, guides, blog posts, tutorials, etc.
90+
91+
## Drawbacks
92+
93+
> Why should we *not* do this? Please consider the impact on teaching Ember,
94+
on the integration of this feature with other existing and planned features,
95+
on the impact of the API churn on existing apps, etc.
96+
97+
> There are tradeoffs to choosing any path, please attempt to identify them here.
98+
99+
## Alternatives
100+
101+
> What other designs have been considered? What is the impact of not doing this?
102+
103+
> This section could also include prior art, that is, how other frameworks in the same domain have solved this problem.
104+
105+
## Unresolved questions
106+
107+
> Optional, but suggested for first drafts. What parts of the design are still
108+
TBD?

0 commit comments

Comments
 (0)