-
Notifications
You must be signed in to change notification settings - Fork 137
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
@embroider/macros
uses previously cached macro condition
#906
Comments
I was able to reproduce. One minor change to the above steps to reproduce:
Some of the dependencySatisfies checks in engines are checking for this version so this version guarantees that all checks will toggle. I will look into this. |
thoov
added a commit
to thoov/embroider
that referenced
this issue
Jul 29, 2021
dependencySatisfies can become invalid if babel caches the macros plugin + the dependency that is being checked for changes its package version. This adds a cache busting plugin that tracks a hash of the contents of the apps lock file so any changes to dependencies will bust the cache. Fixes: embroider-build#906
thoov
added a commit
to thoov/embroider
that referenced
this issue
Aug 4, 2021
dependencySatisfies can become invalid if babel caches the macros plugin + the dependency that is being checked for changes its package version. This adds a cache busting plugin that tracks a hash of the contents of the apps lock file so any changes to dependencies will bust the cache. Fixes: embroider-build#906
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We're seeing issues where a previously cached macro condition is being used as part of the build. For example,
ember-engines
uses@embroider/macros
to have differing logic depending onember-source
version. It's possible for (seemingly) a previously cached macro condition to be used for an incompatibleember-source
version. The macro condition that's evaluated as part of the build can be incorrect, and you can get into a state where the macro condition is evaluated correctly withoutbroccoli-persistent-filter
's caching enabled (CI=true
); however, withbroccoli-persistent-filter
's caching enabled (regular builds withoutCI=true
) the macro condition is incorrect.For a simple reproduction I've created a sample repo in OSS: https://github.com/brendenpalmer/embroider-macros-caching-repro.
Steps to reproduce:
yarn install
ember b
dist/assets/vendor.js
; the evaluated macro (specifically the one used inlink-to-external
) fromember-engines
is correctyarn add [email protected]
ember b
dist/assets/vendor.js
; the evaluated macro (specifically the one used inlink-to-external
) fromember-engines
is incorrectCI=true ember b
dist/assets/vendor.js
; notice that the evaluated macro (specifically the one used inlink-to-external
) is now differentThe text was updated successfully, but these errors were encountered: