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

Upgrade VM @glimmer/* packages from 0.84.3 to 0.85.13 #20561

Merged
merged 27 commits into from Nov 15, 2023

Conversation

NullVoxPopuli
Copy link
Sponsor Contributor

@NullVoxPopuli NullVoxPopuli commented Oct 24, 2023

This is post-the-major-refactor-that-yehuda-did.

Huge thanks to @wycats and @chancancode for helping me through this upgrade process 🎉

GlimmerVM changes

  • some cruft / techdebt removed (a few polyfills, etc)
  • no more enums (which have a runtime cost)
  • better handling of locals detection:
  • Various breaking API changes (things got re-organized a bit)

Changes

  • @glimmer/interfaces no longer provides the Option type. This has been internalized to @ember/-internals/utility-types (renamed to Nullable to match, tho)
  • @glimmer/util no longer provides a WeakSet polyfill, so ember now uses native WeakSet -- which has been supported by everyone for nearly all of time: https://caniuse.com/?search=WeakSet
  • ComponentDefinition's capabilities property is now of type CapabilityMask, instead of InternalComponentCapability
  • @glimmer/validator's setTrackingTransactionEnv is now only accessible via the 'debug' export
  • Fix some Reference situations, some types to Reference, and some pushing casting down to the last possible place
  • CurriedType is now in @glimmer/vm, because it's a value, not just a type/interface
  • programCompilationContext now takes a third argument
  • Remove https://babeljs.io/docs/babel-plugin-transform-block-scoping
    • this is included in @babel/preset-env (so its used if needed, as determined by targets, which our targets don't determine that we need it)
blockers that are no longer
not good ideas (or not good right now), now abandoned

testem.browserstack.js Outdated Show resolved Hide resolved
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review November 11, 2023 15:47
@NullVoxPopuli NullVoxPopuli changed the title Bump vm packages Upgrade VM @glimmer/* packages, and update usage based on their API changes Nov 11, 2023
Upgrade VM @glimmer/* packages

Also, @glimmer/vm needed to be added to the root package.json so non-declared dependencies (such as @ember/-internals) may be provided access to @glimmer/vm

Upgrade glimmer-vm again
… the type to @ember/-internals/utility-types
… now requires an 'errors' object so that errors can be reported back to the user if something goes wrong"

This reverts commit 0092ad7.
@@ -417,7 +417,7 @@ function makeClosureAction(
return (...args: any[]) => {
let payload = { target: self, args, label: '@glimmer/closure-action' };
return flaggedInstrument('interaction.ember-action', payload, () => {
return join(self, fn, ...processArgs(args));
return join(self, fn as AnyFn, ...processArgs(args));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think it's valid to push the cast down to here 👍🏼

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

… fix, but it was likely pre-existing"

This reverts commit 1856b8c.
Copy link
Member

@chancancode chancancode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than fixing that final unchecked type cast I think we are good, can you apply those suggestions (verbatim or spirit of it) and squash when merging?

NullVoxPopuli and others added 2 commits November 15, 2023 07:43
Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
@chancancode chancancode changed the title Upgrade VM @glimmer/* packages, and update usage based on their API changes Upgrade VM @glimmer/* packages from 0.84.3 to 0.85.13 Nov 15, 2023
@chancancode chancancode enabled auto-merge (squash) November 15, 2023 19:02
@chancancode chancancode merged commit 32c669e into emberjs:main Nov 15, 2023
14 checks passed
@NullVoxPopuli NullVoxPopuli deleted the upgrade-glimmer-vm0.85.3 branch November 15, 2023 19:46
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

Successfully merging this pull request may close these issues.

None yet

2 participants