-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix baseline-exact-dependencies with new GCV #1487
Conversation
Generate changelog in
|
Is it possible to write a test for this? Does it work with GCV <1.26.0 too? |
We're currently testing it with old GCV - I suppose I could add a test for new GCV but the problem is the issue we've seen is a heisenbug... I couldn't reproduce it locally, for instance. |
// Alternatively, we could tell GCV to lock this configuration, at the cost of a slightly more | ||
// expensive 'unifiedClasspath' resolution during lock computation. | ||
if (project.getRootProject().getPluginManager().hasPlugin("com.palantir.versions-lock")) { | ||
explicitCompile.extendsFrom(project.getConfigurations().getByName("lockConstraints")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels quite weird to have this direct knowledge of GCV here? Will this still work with old GCV?
I am also struggling to reproduce this bug locally anywhere :( |
👍 Let's see if this fixes people's problems |
Released 3.37.1 |
Before this PR
com.palantir.baseline-exact-dependencies
tries to copy over constraints from<source-set>CompileClasspath
, in order to pick up versions.lock constraints generated by GCV.However, after palantir/gradle-consistent-versions#557, these are no longer implemented as explicit constraints inherited by that configuration (which would have shown up in
compileClasspath.getAllDependencyConstraints()
), but instead GCV uses a dependency to a configuration on the root project, which itself holds these constraints in a single centralized place.This means that the configuration resolved by tasks like
checkUnusedDependenciesMain
etc now lacksversions.lock
constraints, leading to weird outcomes including flakes.After this PR
==COMMIT_MSG==
Fix
com.palantir.baseline-exact-dependencies
to work with GCV 1.26.0+.==COMMIT_MSG==
Possible downsides?