Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backing out ember real-modules mode #978

Merged
merged 4 commits into from
Sep 24, 2021
Merged

backing out ember real-modules mode #978

merged 4 commits into from
Sep 24, 2021

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Sep 23, 2021

  • it breaks many addons that aren't ready for the global Ember to be missing during vendor.js
  • it exacerabtes the problem of ember's internally-packaged deps (like route_recognizer) fighting with other copies

We discussed making this a flag instead, but since then the plan is that Ember 4.0 itself will make ember-auto-import 2.0 mandatory, which smoothes the path to distributing ember-source as a v2 addon, in which case that should become the "flag" for doing static analysis of ember.

Instead, all that was required for 3.27 compatibility was a compat adapter for @glimmer/tracking, since its magic stuff used to be handled by the modules-api-polyfill and now it needs to be handled differently.

The rewritten @glimmer/tracking is automatically inert on older ember versions because it never emits implicit-modules, so it will only get included in the build if somebody is importing it, and under older ember versions nobody will import it because the imports get rewritten to Ember._tracked, etc.

 - it breaks many addons that aren't ready for the global `Ember` to be missing during vendor.js
  - it exacerabtes the problem of ember's internally-packaged deps (like route_recognizer) fighting with other copies

We discussed making this a flag instead, but since then the plan is that Ember 4.0 itself will make ember-auto-import 2.0 mandatory, which smoothes the path to distributing ember-source as a v2 addon, in which case that should become the "flag" for doing static analysis of ember.

Instead, all that was required was a compat adapter for `@glimmer/tracking`, since it's magic bullshit used to be handled by the modules-api-polyfill and now it needs to be handled differently.
Now that the fastboot-specific package.json output includes `type: 'addon'` within the ember metadata, it needs to come after the app's own ember metadata. Otherwise the app gets labeled as an addon.
@ef4 ef4 merged commit 9f6d63a into master Sep 24, 2021
@ef4 ef4 deleted the revert-loose-ember-modules branch September 24, 2021 18:27
@ef4 ef4 added the bug Something isn't working label Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant