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

Confusing behavior for updateLock #114

Open
sghill opened this issue Jan 3, 2017 · 3 comments
Open

Confusing behavior for updateLock #114

sghill opened this issue Jan 3, 2017 · 3 comments

Comments

@sghill
Copy link
Contributor

sghill commented Jan 3, 2017

Running updateLock with no parameters places a new lock file in the build directory (running generateLock). It'd be more intuitive for users of other dependency management systems if this also automatically added the file to the source directory (saveLock)

@jhspaybar
Copy link

Oh, that would be nice, but the issue I was getting at was that if you already have a lock file and run updateLock it doesn't actually update the versions of existing dependencies. For example, if I have a dependency on org:foo-lib:1.+ and I'm locked to 1.0.3 when I run updateLock saveLock I'll still be on 1.0.3 even though the tool recognizes there's a newer 1.0.4 version. I have to explicitly run updateLock with an argument telling to bump foo-lib in the lock file. This behavior also differs from existing other language solutions which update everything with no argument or only the thing passed if there is an argument.

@dcow
Copy link

dcow commented Jan 4, 2017

Other dependency management solutions don't also have a formalized notion of build artifacts and task inputs/outputs. Because gradle has a bigger scope, the problem can be decomposed more granularly. Something you can do for example is compare the updated lock file with the current lock file for issues or editing before "saving" it. You'd be relying on your version control system to otherwise perform this function. You also get to leverage gradle's ability to evaluate task inputs/outputs when updating or saving (if the newly generated file does not differ from the current one, no actual work should be done).

IIRC saveTask.mustRunAfter lockTask updateTask so you could write a dummy task that dependsOn both and simply run that.

@rpalcolea
Copy link
Member

Hey @sghill , can you fill me in on this one? wondering if there are ergonomics we can improve here in the future

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

4 participants