embroider-build / embroider

Compiling Ember apps into spec-compliant, modern Javascript.
MIT License
330 stars 137 forks source link

Embroider 1.9.0 breaks all `this` context in component templates #1287

Closed RobbieTheWagner closed 1 year ago

RobbieTheWagner commented 1 year ago

If I update to Embroider 1.9.0 and try to use this.foo in my template, it tells me it is undefined. Any ideas what is going on here?

RobbieTheWagner commented 1 year ago

Seems to be related to ember-cli-typescript

lifeart commented 1 year ago

Looks related to https://github.com/embroider-build/embroider/issues/1261

NullVoxPopuli commented 1 year ago

As a counter example (meaning, actual problem is something very specific, perhaps?) I have embroider 1.9.0 + TS working here: https://github.com/NullVoxPopuli/limber/blob/main/frontend/ember-cli-build.js however every single one of my components is using <template>

RobbieTheWagner commented 1 year ago

We think this might be related to ember-svg-jar as well. Something with running it and TS.

RobbieTheWagner commented 1 year ago

Not related to svg-jar. It's just using TS for a component and trying to use Embroider 1.9.0 makes things go 💥 . Reproduction here https://github.com/rwwagner90/embroider-svg-ts-bug

ef4 commented 1 year ago

This is a duplicate of #1273 which is fixed on main. Working on getting it released.

RobbieTheWagner commented 1 year ago

@ef4 any idea when a release will be cut?

ef4 commented 1 year ago

I'm actively working on it, but I'm doing it carefully by hand because we have a new unproven release process that lets us do semver major releases in only the packages that need them.

This bug fix is in @embroider/compat, the next release of that package is planned to be 2.0 because of changes to this supported ember versions, but we can circle back around and back port the bug fix to 1.9 if that becomes important.

The breaking change is that we dropped support for unsupported ember releases. So the oldest supported ember will become 3.28.

RobbieTheWagner commented 1 year ago

@ef4 I think a major breaking release sounds fine to me. Ember 3 is getting older now, and I think we'll want people to be on the latest and greatest to get all the nice things.

RobbieTheWagner commented 1 year ago

@ef4 do you have any idea when we can expect the release to be out? I'm in an unfortunate situation where a lot of other things seem to be broken if I don't use 1.9.0, but 1.9.0 breaks my TS 😢

ef4 commented 1 year ago

I hoped to get it done today but I’m not there yet.

(In general, when blocked on an upstream bug I think patch-package is a good solution. Also pnpm has built-in support for the same kind of thing.)

RobbieTheWagner commented 1 year ago

I hoped to get it done today but I’m not there yet.

(In general, when blocked on an upstream bug I think patch-package is a good solution. Also pnpm has built-in support for the same kind of thing.)

We have decided to just not use Embroider for now, so I am unblocked.