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
Watcher semantics are incorrect for use with BROCCOLI_ENABLED_MEMOIZE #9020
Comments
FWIW, the reason this is using |
That makes sense. So I think in detail it would be:
|
was this resolved? @ef4 did anything change from 2020? |
I don't think anything is changed, embroider still ships with a workaround for this. But if you are seeing a problem in your apps, please report it because the workaround in embroider is supposed to make this not matter. |
in classic ember build, we are not able to use the BROCCOLI_ENABLED_MEMOIZE flag because the re-build doesn't update scss changes. |
Ah, so when I reported this it wasn't actually causing any problems in classic apps. So maybe something has changed. |
Places like this:
ember-cli/lib/broccoli/ember-app.js
Line 277 in 3527827
that use
UnwatchedDir
are assuming that complete rebuilds will be triggered by the parent path's watcher. But that violates the assumptions that make BROCCOLI_ENABLED_MEMOIZE work. It's supposed to know which trees need to rebuild based on which files the watcher mentions. An UnwatchedTree will never rebuild, and then its downstream trees will also not rebuild.However, it turns out this bug is cancelled out by other bugs, and apps do still get rebuilding of their styles. But it happens by accident, because
app.trees.styles
itself never updates.app.trees.styles
tree never updates, the changes propagate forward via the symlinked directory.I came upon this behavior because of the way Embroider consumes the app's styles. It depends on
app.trees.styles
, and that works with BROCCOLI_ENABLED_MEMOIZE off because even though that tree never updates, trees downstream from it would always run and would follow the symlinking to the updated files. But with BROCCOLI_ENABLED_MEMOIZE enabled, app CSS fails to rebuild under embroider because we really need the tree to update correctly.The text was updated successfully, but these errors were encountered: