Ok, so I recently discovered – much to my surprise – that ] update Foo in fact updates all of the packages in my project. To update a single package you have to instead do ] up Foo. This is super, super confusing. I’ve been doing ] update Foo this whole time incorrectly.
Can we fix this somehow? Either a single, combined command for updating packages or at the very least an error if you give unexpected arguments to these commands.
Oh woah that’s nuts… I’m confused in my own confusion. So if up and update are synonymous then eg both ] update DataFrams and ] up DataFrames actually update all the packages, the DataFrames bit is completely ignored.
How do I update just a single package?
I’d like to present my own misunderstanding of my own confusion as further evidence that this interface is confusing
In any case, assuming this hasn’t changed, I think the solution for now is 1) either pin things you for sure don’t want to update or 2) version control your Manifest.toml so you can always roll back if something broke.
Indeed there have been some changes. AFAIK the tiered resolver approach has been implemented, and you can even specify a --preserve option for the tier. Updating a package however should always fix unrelated dependencies in your project.
Pkg should already be doing just that. ]up Foo will only update Foo and its dependencies, and will even leave shared dependencies with other added packages in the same project untouched. If your entire project is being updated, this is likely a bug unless you’re using Julia pre-1.0. Could you produce an MWE?
Just for reference, this is actually mentioned explicitly in the Pkg docs:
Simply calling up will try to update all the dependencies of the project to the latest compatible version. Sometimes this is not what you want. You can specify a subset of the dependencies to upgrade by giving them as arguments to up