You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This quest issue tracks the high-level tasks needed to complete implementation of the Module Unification RFC in Ember. Module Unification offers both an updated file system layout (based on an updated "pods" structure) as well as a simpler set of rules for how a module must be named, leading to significantly improved application boot time.
Some prior art exists in the 201 Created resolver that implements the Module Unification rules. However, this resolver is designed for maximum compatibility and for testing out the feature; it is not designed to take advantage the performance benefits of the new proposal.
As part of our work building Glimmer-based apps for Monegraph, @dgeb had re-implemented a smaller and more-performant subset of Ember's container, resolver, and registry in TypeScript. We have now open sourced these components under an MIT license and hope they can serve as the basis for Ember. Older semantics that we still need to support can be implemented as a compatibility layer on top of these libraries, so apps that don't need them can get maximum performance.
Those libraries are:
@glimmer/di - Container and registry, resolver interface
@glimmer/resolver - Implementation of resolver using Module Unification rules
Move tests that cover @glimmer/di API to @glimmer/di
Container tests passing
Refactor Registry to inherit from @glimmer/di
Move tests that cover @glimmer/di API to @glimmer/di
Registry tests passing
Create new ember-module-unification-resolver package with Ember resolver config, inherit from @glimmer/resolver
Figure out the fallback mechanism for MU (src/ dir) to ember-cli (app/) to legacy globals resolution. Is this multiple resolvers, or one resolver with fallback implemented internally (likely the latter since this is how it works today where we have fallback).
Deprecate default resolver
No one relies on App.FooController or Ember.TEMPLATES lookup anymore, we should deprecate these because they add a lot of code and complexity
Write deprecation RFC
Update Ember-CLI blueprints (generators) to use MU layout
Make the new resolver log when ENV.APP.LOG_RESOLVER = true
Ember-CLI requires the app/styles directory be present per ember-app.js. This needs to change upstream.
In Ember-CLI this.trees.app is too contstraining- it only permits us to look in a single place for index.html for example, when the new resolver rules suggest we should look in src/ui/ first.
Templates currently compile with a default export, meaning you can only name them ${name}/${type}.hbs. The compiler needs to know it can export template when the file is just named ${name} (or that it should output to the ${name}/${type} module path).
Developer Ergonomics
Integrate MU migration tool into Ember CLI, automatically offer to update apps to the new layout after update
Migration tool should update the app to the MU-only resolver once it has rearranged all of the files
Lint applications and warn:
1. If the app has an app/ directory but doesn't use the fallback resolver
2. If the app does not have an app/ directory and is still using the slower fallback resolver
The text was updated successfully, but these errors were encountered:
Quest: Module Unification
This quest issue tracks the high-level tasks needed to complete implementation of the Module Unification RFC in Ember. Module Unification offers both an updated file system layout (based on an updated "pods" structure) as well as a simpler set of rules for how a module must be named, leading to significantly improved application boot time.
Some prior art exists in the 201 Created resolver that implements the Module Unification rules. However, this resolver is designed for maximum compatibility and for testing out the feature; it is not designed to take advantage the performance benefits of the new proposal.
As part of our work building Glimmer-based apps for Monegraph, @dgeb had re-implemented a smaller and more-performant subset of Ember's container, resolver, and registry in TypeScript. We have now open sourced these components under an MIT license and hope they can serve as the basis for Ember. Older semantics that we still need to support can be implemented as a compatibility layer on top of these libraries, so apps that don't need them can get maximum performance.
Those libraries are:
@glimmer/di
- Container and registry, resolver interface@glimmer/resolver
- Implementation of resolver using Module Unification rulesTasks
@glimmer/di
@glimmer/resolver
Ember.js
@glimmer/di
package into Ember buildts
files in Ember repoContainer
to inherit from@glimmer/di
@glimmer/di
API to@glimmer/di
Registry
to inherit from@glimmer/di
@glimmer/di
API to@glimmer/di
@glimmer/resolver
src/
dir) to ember-cli (app/
) to legacy globals resolution. Is this multiple resolvers, or one resolver with fallback implemented internally (likely the latter since this is how it works today where we have fallback).App.FooController
orEmber.TEMPLATES
lookup anymore, we should deprecate these because they add a lot of code and complexityENV.APP.LOG_RESOLVER = true
ember-resolver
@glimmer/resolver
into ember-resolver.@glimmer/resolver
import Resolver from "ember-resolver/turbo"?
)Ember CLI / Build Pipeline
src/
. Theapp/
tree must also still be read.ember-cli-build.js
hooks to passsrc
tree (peer ofappTree
hooks)app/styles
directory be present per ember-app.js. This needs to change upstream.this.trees.app
is too contstraining- it only permits us to look in a single place for index.html for example, when the new resolver rules suggest we should look in src/ui/ first.${name}/${type}.hbs
. The compiler needs to know it can export template when the file is just named${name}
(or that it should output to the${name}/${type}
module path).Developer Ergonomics
app/
directory but doesn't use the fallback resolverapp/
directory and is still using the slower fallback resolverThe text was updated successfully, but these errors were encountered: