-
Notifications
You must be signed in to change notification settings - Fork 674
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
SOLR-17602: Per-Module Dependency Locking #2925
base: main
Are you sure you want to change the base?
SOLR-17602: Per-Module Dependency Locking #2925
Conversation
The platform module includes all dependencies from the version catalog as constraints and is added to the root modules as API for transitive inheritance of the constraints.
…ndency-resolution
Removes carrot-search dependencychecks plugin
@dsmiley does this go to the right direction in regards to your ticket? |
In the gradle documentation and in general, lockfiles are generated via ./gradlew dependencies --write-locks. This commit fixes the issue where the dependencies task is used instead of the resolveAndLockAll for lockfile generation and the lockfiles are not properly updated.
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.
does this go to the right direction in regards to your ticket?
Yes but definitely doesn't solve them. I like that this PR makes it easy to know if a dependency is on a certain configuration/classpath without having to google the gradle command to accomplish the same. And if we change the dependencies, we might notice unanticipated changes.
The error-prone aspect is unfortunate. I wonder if we're disabling error-prone by default in the wrong way.
+1 to this PR.
}.findAll { | ||
// Do not depend on disabled tasks or tasks that do not exist | ||
// :platform module does not have a renderJavaDoc and therefore task is null | ||
it != null && it.enabled == true |
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.
in groovy I think this can be it?.enabled == true
and maybe not even need the == true
part
https://issues.apache.org/jira/browse/SOLR-17602
Description
To improve the developer experience of the dependency management, we are looking for solutions to make the dependency lock files more developer-friendly / readable.
Solution
This solution is based on #2915 which introduces a platform module for aligning the dependency version across our project via constraints.
This PR removes the carrotsearch dependencycheck plugin and falls back to the default gradle tasks for generating lockfiles. It defines a new task that can be used via
gradlew resoslveAndLockAll --write-locks
. This task generates or updates existinggradle.lockfile
in each module.Additional gradle configuration has been added to lock all module configurations by default. The task
resolveAndLockAll
will then filter and lock only the resolveable dependencies.PR should update documentation before merging (in case this solution is considered).
gradlew resoslveAndLockAll --write-locks -Pvalidation.errorprone=true
. Explicitly enabling is not recommended, as there are other tasks that may fail as well if errorprone is not explicitly enabled.Tests
Not tested yet.
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.