Skip to content
This repository has been archived by the owner on Feb 17, 2019. It is now read-only.

Cache is never repopulated when just the dependency changes #64

Open
NinoFloris opened this issue Feb 2, 2018 · 0 comments
Open

Cache is never repopulated when just the dependency changes #64

NinoFloris opened this issue Feb 2, 2018 · 0 comments

Comments

@NinoFloris
Copy link

NinoFloris commented Feb 2, 2018

Following the code and the debug messages we see the following

broccoli-eyeglass:persistent-cache Cannot cache app.scss. Reason: dependency changed:
src/frontend/scss/core/_box.scss +3ms
broccoli-eyeglass:persistent-cache Stacktrace: Error: dependency changed: src/frontend/scss/core/_box.scss

Looking at the code in broccoli_sass_compiler I see that this function call
https://github.com/sass-eyeglass/broccoli-eyeglass/blob/master/lib/broccoli_sass_compiler.js#L395

      dependencies.map(dep => this.checkDependency(srcDir, dep));

is right outside the try that sets error.key = key in its catch which means the check at handleCacheMiss https://github.com/sass-eyeglass/broccoli-eyeglass/blob/master/lib/broccoli_sass_compiler.js#L614

   return this.compileCssFile(details).
      then(result => {
        if (key) {
          return this.populateCache(key, details, result);
        }
      });

never triggers a repopulation of the cache, e.g. we're stuck forever as the cache won't ever be repopulated with rebuilt output.

Cache repopulation does work if I touch the entrypoint but we have 10 - 100 entrypoints for each of our customers, touching them all isn't an option as it would pollute our commits enormously.

@NinoFloris NinoFloris changed the title Cache is never invalidated when dependency changes Cache is never repopulated when dependency changes Feb 2, 2018
@NinoFloris NinoFloris changed the title Cache is never repopulated when dependency changes Cache is never repopulated when just the dependency changes Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant