-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Allow AST plugins' output be cached based on external files #238
Allow AST plugins' output be cached based on external files #238
Conversation
…n their location information.
dependency invalidation.
…se it's more inclusive of older versions of ember.
Tests are failling in windows, but passing in os-x. I've setup a dev environment in window and can reproduce the issue now. Will have a fix soon. |
Tests are green. I had to disable some of the legacy ember version tests for ast plugins because there was no way to unregister plugins once registered. |
I'd like to squash all these commits down to just 1 commit prior to landing the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks very good, only one relatively small change needed then we should be good to release.
Thanks for working through this!
…emplate node yet, we have to keep a stack counter of Program nodes that we've seen so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your hard work on this!
Gonna leave merge + release for the AM (never merge and release just before bed 😝). @stefanpenner - Lemme know if you have any objections... |
🎉 Thanks @rwjblue & @stefanpenner for helping landing this! |
I just saw this PR in the changelog but the title and description do not really describe what it does or why it's an enhancement. Could you elaborate on the purpose of this PR? |
@Turbo87 - Updated title and description to be more descriptive. |
thanks 🙏 |
In order for certain AST plugins to be cached properly, they may need to include other files into their cache key.
This is useful when you'd like to change the compiled template output based on the contents of a
component.css
file (which is something that css-blocks would need). Prior to this PR the only way to do this was to have the AST plugin completely opt out of caching (by returning a unique value for its cache key) which obviously has fairly severely negative implications for overall build performance, but is not even enough! Editing the.hbs
file would gather any.css
file changes, but editing the related.css
would still never cause the.hbs
file to be recompiled.