-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Dependency versions can be pinned #228
Conversation
Commands such as neil-dev dep add hiccup/hiccup --version 1.0.1 --pin false now actually work. Previously, --pin false was a noop, nil and false was treated as the same value. New behavior: --pin true sets :neil/pinnned to true --pin false sets :neil/pinned to false no --pin argument does not change the file.
I think this PR takes the original issue a bit further than I imagined. Just supporting adding |
OK, I'll update the PR. I agree that it might be too much to introduce at once, at least before we know whether a new option and changed |
Note: the behavior change i implemented did not add a new subcommand, but an optional argument |
@borkdude I think this looks good now–mind giving a second review? |
Ah that makes sense
https://www.michielborkent.nl
https://www.eetvoorjeleven.nu
…On Wed, 12 Jun 2024 at 16:28, Teodor Heggelund ***@***.***> wrote:
I don't think I'd want to type neil dep pin foobar/foobar which is about
the same, if not more effort than just editing the deps.edn.
Note: the behavior change i implemented did not add a new subcommand, but
an optional argument :pin to neil dep add. Similar, but not exactly the
same.
—
Reply to this email directly, view it on GitHub
<#228 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACFSBRRXZ3XW322JFT3D33ZHBLHXAVCNFSM6AAAAABJGK53TWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGE2TSNBUGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I think `version-clj/older?` covers all cases
Please answer the following questions and leave the below in as part of your PR.
This PR corresponds to an issue with a clear problem statement.
I have updated the CHANGELOG.md file with a description of the addressed issue.
I have considered whether I should add more tests covering the code I've changed.
Progress
I'm ready to merge if everything looks good.
Motivation
neil
users may not always want to update a dependency, for example due to introduced breaking changes. Currently,neil dep upgrade
will upgrade all those dependencies, and the user will have to revert the change by hand.Implemented behavior
Dependencies in
deps.edn
can now be pinned. Pinned dependencies have:neil/pinned
set totrue
. Runningneil dep upgrade
on the followingdeps.edn
file will upgradecheshire/cheshire
, but leavehiccup/hiccup
alone.Pinned dependencies are ignored when
neil dep upgrade
updates dependencies.Future ideas
neil dep add
could support an optional--pin
argument. Something like this: