Skip to content

Convert @sentry/ember addon to V2 addon format #15835

@johanrd

Description

@johanrd

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 .

Activity

moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Mar 27, 2025
added theissue type on Mar 27, 2025
mydea

mydea commented on Mar 27, 2025

@mydea
Member

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.

moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Mar 27, 2025
johanrd

johanrd commented on Mar 27, 2025

@johanrd
Author

@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.

moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Mar 27, 2025
mydea

mydea commented on Mar 27, 2025

@mydea
Member

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.

moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Mar 27, 2025
johanrd

johanrd commented on Mar 27, 2025

@johanrd
Author

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

moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jul 31, 2025
RobbieTheWagner

RobbieTheWagner commented on Jul 31, 2025

@RobbieTheWagner

@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.

moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jul 31, 2025
s1gr1d

s1gr1d commented on Aug 1, 2025

@s1gr1d
Member

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.

moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 1, 2025
mydea

mydea commented on Aug 4, 2025

@mydea
Member

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

aklkv commented on Aug 4, 2025

@aklkv

I can give it a try with yarn v1 setup, but the last time I tried I failed miserably to even build it locally.

moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 4, 2025
mydea

mydea commented on Aug 4, 2025

@mydea
Member

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! 🙏

moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @aklkv@mydea@RobbieTheWagner@johanrd@stephanie-anderson

        Issue actions

          Convert `@sentry/ember` addon to V2 addon format · Issue #15835 · getsentry/sentry-javascript