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

Regression on app-js order/shadowing #1905

Open
simonihmig opened this issue May 7, 2024 · 2 comments
Open

Regression on app-js order/shadowing #1905

simonihmig opened this issue May 7, 2024 · 2 comments

Comments

@simonihmig
Copy link
Collaborator

We are using ember-cli-sentry (v1 addon, and yes, I know it's old and deprecated), and an internal (v2!) addon that is overriding the former's instance-initializers/raven-setup.js (using app-js). To ensure its own initializer takes precedence, it has explicitly this meta data in its package.json:

  "ember": {
    "edition": "octane",
    "after": [
      "ember-cli-sentry"
    ]
  },

This works fine in a classic build: only the internal addon's initializer is invoked, shadowing the one from ember-cli-sentry.

But when switching to Embroider (v3), this regresses: the initializer from ember-cli-sentry is called. The internal addon's one is not even in the bundle AFAICT. Same applies for the service. Changing after to before also makes no difference.

I believe we didn't see this when the internal addon was still v1 based, but not entirely sure.

@simonihmig
Copy link
Collaborator Author

@patricklx pointed my to ./node_modules/.embroider/resolver.json#activeAddons, which lists our internal addon before ember-cli-sentry, and that does not change when I change ember.after to before.

@simonihmig
Copy link
Collaborator Author

For the record, this issue has been discussed a bit on Discord, and @ef4 has a hunch that the ordering might not be correct for native v2 addons, see https://discord.com/channels/480462759797063690/1237465816199593994/1237466743715266703

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant