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

Core locking ergonomics with write-locks and update-locks #66

Open
OdysseusLives opened this issue Nov 12, 2019 · 1 comment
Open

Core locking ergonomics with write-locks and update-locks #66

OdysseusLives opened this issue Nov 12, 2019 · 1 comment

Comments

@OdysseusLives
Copy link
Member

OdysseusLives commented Nov 12, 2019

Given a project uses Gradle core locking
And locks are in use,
When a dependency resolves to a new version
And --write-locks and --update-locks with a group & artifact are both invoked,
Then the user should be informed that these should not be run at the same time

Here is a sample project that walks through this scenario: https://github.com/nebula-plugins/gradle-nebula-integration/tree/master/locking-ergonomics

In the end, the update-locks is used (which is better than unlocking & resolving all dependencies), but it would be better to warn the user.


Looks like these values are set here in the DefaultDependencyLockingProvider[1] and then get used in the LockEntryFilterFactory.forParameter(...) where if there are no dependencies to update, then a FILTERS_NONE is returned. But if there are selective dependencies to update, then only those are updated.

[1]https://github.com/gradle/gradle/blob/master/subprojects/dependency-management/src/main/java/org/gradle/internal/locking/DefaultDependencyLockingProvider.java#L69-L75
[2]https://github.com/gradle/gradle/blob/master/subprojects/dependency-management/src/main/java/org/gradle/internal/locking/LockEntryFilterFactory.java#L45-L67

@OdysseusLives OdysseusLives changed the title Core locking ergonomics with write-locks and update-locks Core locking ergonomics with write-locks and update-locks Nov 12, 2019
@OdysseusLives
Copy link
Member Author

This is tracking gradle/gradle#11319

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

No branches or pull requests

1 participant