Skip to content

fix: backward compatability for did-update - #92

Closed
aklkv wants to merge 2 commits into
emberjs:masterfrom
aklkv:fix/compat-layer
Closed

fix: backward compatability for did-update#92
aklkv wants to merge 2 commits into
emberjs:masterfrom
aklkv:fix/compat-layer

Conversation

@aklkv

Copy link
Copy Markdown
Contributor

as part of modernization I broke compatibility layer on did-update, this adds it back in self contained way

@NullVoxPopuliNullVoxPopuli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't we want the original macro conditions?

constuntrack=(function(){if(macroCondition(dependencySatisfies('ember-source','> 3.27.0-beta.1'))){// ember-source@3.27 shipped "real modules" by default, so we can just use// importSync to get @glimmer/validator directlyreturnimportSync('@glimmer/validator').untrack;}elseif(macroCondition(dependencySatisfies('ember-source','>= 3.22.0-alpha.1'))){// we can access `window.Ember` here because it wasn't deprecated until at least 3.27// eslint-disable-next-line no-undefreturnEmber.__loader.require('@glimmer/validator').untrack;}else{// nothing needed here, we do not call `untrack` in this case}})();

@aklkv

aklkv commented Apr 13, 2026

Copy link
Copy Markdown
ContributorAuthor

yeah my thought was the same initially but I re-tested the original macro path and confirmed it still fails at runtime in the consumer (same DidUpdateModifier tracking assertion Assertion Failed: You attempted to update '...' on '...', but it had already been used previously in the same computation.), even though the build warning is gone; the runtime capability-based resolver is the only variant that fixed the real regression in practice.

@NullVoxPopuli

Copy link
Copy Markdown
Contributor

Can you try this PR? #93

@NullVoxPopuli

Copy link
Copy Markdown
Contributor

I have a hunch this isn't needed -- I did some exploration in #93 and all scenarios pass without any macros. can you provide a reproduction of the issue you're experiencing? My hunch is that a build dep may be out of date. I'll close this for now , but let's please continue discussion on an issue

Sign up for freeto 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.

2 participants

@aklkv@NullVoxPopuli