Use static concurrent cache for dedupe. #1016
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I first tried changing the Map to concurrent but it didn't fix the issue, making it static did though. If making it static has potential issues, an alternative might be something like attaching the provisioner to
Project
innewDedupingProvisioner
to reference to dedupe the deduper itself, which was probably the root problem. I have left the map as concurrent though since I don't think Gradle's threading model is clear enough to safely use a non-concurrent one here.I have run my build with a local snapshot and could confirm it passes with this change.
Fixes #1015