Skip to content
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

DepenencyConstraint Loading Can Persist Between Builds #23

Closed
romeara opened this issue Sep 12, 2019 · 1 comment
Closed

DepenencyConstraint Loading Can Persist Between Builds #23

romeara opened this issue Sep 12, 2019 · 1 comment
Assignees
Labels
bug Something isn't working release scope: micro Changes required for the issue are appropriate for a semantically "micro" release
Milestone

Comments

@romeara
Copy link
Member

romeara commented Sep 12, 2019

Currently, when using Gradle Daemon, it is possible that dependency versions loaded in previous builds are preserved in future ones.

This is due to the static Map used as a cache in loading files - according to some discussions in the Gradle forums, the daemon intentionally keeps classloaders, and therefore the value of static variables, around.

This behavior is inconsistent for consumers - DependencyConstraints should either drop caching, or use a method which accounts for possible changes to the loaded file (such as an updated date or checksum methodology, in addition to path)

@romeara romeara added bug Something isn't working release scope: micro Changes required for the issue are appropriate for a semantically "micro" release labels Sep 12, 2019
@romeara romeara added this to the next-release milestone Sep 12, 2019
@romeara romeara self-assigned this Sep 12, 2019
romeara added a commit that referenced this issue Sep 13, 2019
Change caching logic for loaded dependency information to include time
modified, to prevent stale cached content from being used when changes
are made between builds. This situation could arise due to the Gradle
Daemon re-using class loaders between builds
romeara added a commit that referenced this issue Sep 13, 2019
…stale-cache

GH-23 Fix issue where stale dependency cache could be used across builds
@romeara
Copy link
Member Author

romeara commented Sep 13, 2019

Fixed in PR #25

@romeara romeara closed this as completed Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release scope: micro Changes required for the issue are appropriate for a semantically "micro" release
Projects
None yet
Development

No branches or pull requests

1 participant