-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Problem Statement
Modern Ember build tools (@embroider/vite
and @embroider/webpack
) benefit greatly from static, pre-built addons when bundling the app.
The current @sentry/ember
package is currently on the old ember addon-format. It works, but it is not optimized for the modern ember build tooling, as it does currently needs be processed/rewritten by @embroider
on every build.
Also, it is currently sorted with warnings in the group of other legacy V1 addons when running e.g. npx ember-addon-v2-scanner@latest
:
NPM Name | Version | Current version | On V2 Addon | V2 Addon available |
---|---|---|---|---|
'@sentry/ember' | '9.9.0' | '9.9.0' | ❌ | ❌ |
(related to #12336, but this is more specific)
Solution Brainstorm
Here is a guide for porting an addon to the V2 format .
aklkv
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Milestone
Relationships
Development
Select code repository
Activity
mydea commentedon Mar 27, 2025
Hey, thanks for opening this.
We are currently pretty busy, so I can't really say when the team will find time to pick this up. We'd be happy to review a PR for this, though! A challenge would be that we have to remain compatible with the old format too - not sure if/how it is possible for us to publish both variants at the same time? If this is not possible in the same package, we can probably only make this change in the next major (v10), but work could be prepared for it already in advance.
johanrd commentedon Mar 27, 2025
@mydea ok, good. Yes, it would maybe considered a breaking change in some cases (but also maybe not for a simple addon like this?). The V2 addon format with
@embroider/addon-shim
provides backwards compatible support for classic builds.mydea commentedon Mar 27, 2025
Basically, if current E2E tests using the Ember SDK pass, any change is fine 😅 (I believe). As long as compatibility remains given, we can always update! This means it has to support:
Node 18+
Ember 4+
Which is our current support policy.
johanrd commentedon Mar 27, 2025
Ok, good. Backwards compatibility not be a problem then, as I believe the V2 addon format is supported by ember 3.28+.
46 remaining items
RobbieTheWagner commentedon Jul 31, 2025
@s1gr1d I am telling you it does though. I'm on the Ember Learning Core team and have converted many addons to v2 and maintain quite a large number of addons in general, so I know what I am telling you is true, it's not a guess.
I'm not sure I understand the motivation behind staying on yarn v1 for you all anyway, but if that is what you prefer, we may benefit from splitting out the Ember addon into its own package.
s1gr1d commentedon Aug 1, 2025
Okay then you definitely have experience with that - and it sounds like a very good reason for upgrading yarn. Like I said above, concrete reasons help us prioritize the upgrade to yarn v4. We'll keep you updated on the changes.
mydea commentedon Aug 4, 2025
So, while generally we eventually do want to move to yarn 4, this is not as easy as just bumping the yarn version. I actually made a draft to try this out here: #16744 but it fails in many ways, esp. because it seems to not work great/out of the box with yarn & ci stuff. This needs a bunch of careful work that touches all of the SDKs (not just Ember), we do not know when we will get around to do complete this.
Apart from this: I still do not understand why this should be necessary to update the addon. What exactly should not work with the current yarn v1 approach? I understand that hoisting etc. may affect this, but this should not be a blocking concern and can very much be made to work. Importantly, the thing where this matters (acceptence/e2e tests) are handled in an isolated way anyhow - we do not run ember acceptence test in the monorepo package, but isolated in e2e-tests, which spins up a fully isolated pnpm-based app in a tmp dir, unaffected by the monorepo and yarn 1. This should be more then enough to verify that this works as expected, and unit/integration tests should work just fine with yarn 1?
aklkv commentedon Aug 4, 2025
I can give it a try with yarn v1 setup, but the last time I tried I failed miserably to even build it locally.
mydea commentedon Aug 4, 2025
I you have volta setup, and generally follow our contribution docs, it should work just fine to get things going. let us know if something does not work for you, then we will try to fix it! 🙏