Open asakusuma opened 6 years ago
thanks, I think I'll try and (tonight) disable the parallel support in this plugin, until we re-work it to not have this issue.
Specifically, the issue appears to be localized to the changes in babel-plugin-htmlbars-inline-precompile. Looking at the diff in v1.0.2 to v1.0.3, you can see that one of the dependency bumps includes babel-plugin-htmlbars-inline-precompile, where it reved version v0.2.3 to v0.2.5. v0.2.5 of that plugin contains fixes to parallel builds.
Pinning to v1.0.2 of this lib fixes the issue.
@scalvert the plugin in question, needs to reduce what hash-for-dep considers a dependency of it. I explained how to @asakusuma.
Previously, this plugin was not correctly considering it's cache key or opted out of parallel.
Both the plugin in question, and this plugin need some work. But if the above recommendation I gave @asakusuma is applied the problem will go away entirely (and it will perform better then even the improvement here could do).
@stefanpenner since I forgot, and for future travelers, can you explain how to control what ember-cli-htmlbars-inline-precompile
's hash-for-dep
thinks is a dependency?
Improve hash-for-dep docs: https://github.com/stefanpenner/hash-for-dep/blob/master/README.md#what-does-hash-for-dep-consider-a-dependency
If something can be made clearer please open a PR/issue over there.
We will eventually add docs to the various consuming repos that have plugin authorship extensions (htmlbar/babel)
Is this still an issue?
I noticed that rebuild time for a particular addon (with a lot of handlebars AST transforms) recently ballooned from a few seconds to 80-90 seconds.
It appears that something (I'm guessing the parallel compile) is causing
hash-for-dep
to be invoked as multiple modules, instead of a single module. Since thehash-for-dep
cache is module scoped, invoking as multiple modules means that the cache is effectively useless.EDIT: The cache was only created once in
ember-cli-htmlbars-inline-precompile@1.0.2
. When I upgraded to1.0.3
is when the multiple caches thing happened. There were other things also upgraded though at the same time.cc @stefanpenner