Skip to content

fix: add config values to hash salt - #988

Merged
coreyfarrell merged 4 commits into
istanbuljs:masterfrom
taye:fix-cache-invalidation
Feb 27, 2019
Merged

coreyfarrell merged 4 commits into
istanbuljs:masterfrom
taye:fix-cache-invalidation

Conversation

@taye

@taye taye commented Feb 10, 2019 •

Copy link
Copy Markdown
Contributor

This PR adds the instrumenter-related config options to the salt of the cache hash. This fixes a bug where code that has been cached without instrumentation or source maps is incorrectly reused after the options are later enabled, leading to missing instrumentation. This problem is more likely to come up in projects using babel-plugin-istanbul which recommends setting the sourceMap and instrument options to false.

Closes #552 and probably also #822 #822 #974 #980

Thank you to everyone maintaining and contributing to this project ❤️

@coveralls

coveralls commented Feb 10, 2019 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.2%) to 96.639% when pulling 2858ac9 on taye:fix-cache-invalidation into 8a5e222 on istanbuljs:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 96.399% when pulling 987e4dd on taye:fix-cache-invalidation into 8a5e222 on istanbuljs:master.

3 similar comments
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 96.399% when pulling 987e4dd on taye:fix-cache-invalidation into 8a5e222 on istanbuljs:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 96.399% when pulling 987e4dd on taye:fix-cache-invalidation into 8a5e222 on istanbuljs:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 96.399% when pulling 987e4dd on taye:fix-cache-invalidation into 8a5e222 on istanbuljs:master.

@coreyfarrell coreyfarrell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please hold off on any changes related to potentially disabling cache based on instrument or instrumenter for now.

Comment thread lib/hash.js Resolved
Comment thread lib/hash.js Resolved
Comment thread lib/hash.js Resolved
@coreyfarrell
coreyfarrell requested review from JaKXz and bcoe February 10, 2019 17:15
@JaKXz
JaKXz requested a review from coreyfarrell February 25, 2019 00:52

@coreyfarrell coreyfarrell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for contributing!

@JaKXz JaKXz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bcoe @coreyfarrell it would be cool if all the issues @taye mentioned could be closed in the merge commit but I'll leave that judgement call to you

@coreyfarrell

Copy link
Copy Markdown
Member

I think #522 is the only one this should close. The other tickets are either unrelated or of undetermined cause.

@coreyfarrell
coreyfarrell merged commit 7ac325d into istanbuljs:master Feb 27, 2019
@coreyfarrell coreyfarrell mentioned this pull request Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache key doesn't take --source-map into account

4 participants