Whenever you add a package, a resolution is run that determines the latest possible version of that package, which will be installed. Same when you upgrade. When you have a Manifest and you do instantiate
you install the exact versions of the packages recorded in the manifest without any resolution.
I made a comment to that effect in the PR. I think this would be extremely useful for container setup scripts such as dockerfiles.
So essentially what I think you are saying is that you have to explicitly tell it to upgrade a package every time you want one updated? In other words, if I create a package and doe add
, and it fetches me SomePackage 0.1.0
, then my package will always use SomePackage 0.1.0
until I do up SomePackage
from its environment?
pkg> status --tree
mode is a good idea; issue filed:
Currently the issue is that Julia startup + Pkg load time is a bit too heavy to make this very pleasant to use, so youâre better off having keeping a package manager REPL session going. But in the future itâs certainly something we could have.
Yes, Pkg3 is much more conservative about upgrading packages. It never upgrades direct dependencies unless you explicitly ask for them to be upgraded; it will upgrade indirect dependencies as necessary, but tries to avoid it if possible.
I think that for the primary use case (set up scripts) one doesnât have much choice and/or it doesnât matter. As things are right now it seems that docker files might have to be a little ugly
julia -e "import Pkg; Pkg.add(\"PackageAlpha\"); Pkg.add(\"PkgBeta\"); Pkg.checkout(\"PackageGamma\")"
I suppose that is the canonical approach, but I have to say this makes me a little bit nervous especially in Juliaâs case. Since it is a young language, updates are much more important than theyâd be for e.g. Python and now Pkg
provides people with tools that makes it very easy for them to get stuck on legacy code. If it were me Iâd probably make the default behavior to get the most recent packages unless you explicitly cap it, but I recognize I probably have the minority opinion on this.
I havenât read everything but Iâve one question and one remark:
When trying to update packages to v0.7 having to open log files for failing build is quite annoying, is there an option to show the log in the REPL ?
Some colors (light yellow and green) can be very hard to read, choosing colors with similar luminance would be good.
The Pkg2 behavior of upgrading things that one didnât ask it to upgrade is incredibly annoying and ends up forcing a lot of unnecessary pinning. (JuliaPro ships with everything pinned because this behavior is so problematic.) If Iâve asked the package manager to upgrade X
then it should upgrade X
, not some unrelated package that I didnât ask it to upgrade. I donât think the fact that people have to do pkg> up
to upgrade everything will really prevent them from upgrading their packages.
You can do this instead:
julia -e 'using Pkg; pkg"add PackageAlpha PackageBeta PackageGamma"'
Edit: changed import
to using
as pointed out below.
It depends on your background, Iâm assuming the vast majority of users probably have dark backgrounds.
Yeah, I know it was going to have to be this way, this was more of a general expression of angst than a serious suggestion.
Ever the optimistic idealist!
Great, thanks. It might be good to feature this prominently in documentation, since this will be a very common thing for users to have to do because of set up scripts.
Earlier I asked about the extra layer in .julia/packages/PkgName/xxxx
(item 10) and Kristoffer answered. I assume it is directly related to the phrase âin different locations on your systemâ and later on âgarbage collectedâ in the Introduction section of the Pkg docs?
The Introduction also mentions âstackableâ. Is it correct that when one executes add PkgName
it is really (implicitly) a fresh copy of project PkgName
that is added? At least if a Project.toml is present. In that case a generic up
updates all packages, including (and only) the local copy of the added project? I.e. up
is recursive but local.
The 3rd section in the Introduction is what Scott was asking about earlier I guess.
Minor point, that doesnât work as written, you need to do julia -e 'using Pkg; pkg"..."'
so that the @pkg_str
macro can be used.
(I do love being able to do that, itâs a very nice addition!)
It is perhaps better to give a vector of strings to Pkg.add
instead. Will give the same result but doesnât use the repl interface which is arguably made for interactive use.
I wasnât even aware that it could take more than just a single string now.
Thanks for letting us know!
Pkg3 seems broken for me on the 0.7 alpha.
For every package I get
(v0.7) pkg> add JuMP
ERROR: The following package names could not be resolved:
* JuMP (not found in project, manifest or registry)
Please specify by known `name=uuid`.
even though the registry seems to be full. Any ideas whatâs going on?
Edit: I seem to have fixed it by deleting the registries
directory. So if you encounter this problem you might try that.
Hereâs another question:
DataFrames
is itself fully updated for 0.7, but it pulls an old version of StatsBase
. Whatâs the best way of getting it to use StatsBase
master? Right now the only way I see of doing that would be dev DataFrames
, then going into DataFrames and updating. Is that indeed the recommended procedure, or is there some way to tell the tagged version of DataFrames to use the master of StatsBase? (i.e. without doing it manually in git)
pkg> add StatsBase#master
Edit: actually, that adds StatsBase
to your project file which you donât really want since its not a direct dependency. Another way to do this is pkg> dev StatsBase
but that checks out a git clone at ~/.julia/dev/StatsBase
. I canât think of a way to use the master version without either adding it to the project file or checking out a dev copy. Perhaps we should have a way of doing that.
Having to do dev DataFrames
to update the StatsBase
doesnât seem totally unreasonable to me, but I can imagine a situation in which Iâm working on StatsBase
, and I want to check to make sure I havenât screwed up other packages. Right now Iâd have to dev
on each of those packages.
Another question: is there away to generate the tomlâs for the legacy 0.6 packages? That would be really useful especially since they contain the uuidâs.
I had this happen and I solved it by removing old installs of v0.7 in my ~/.julia/
folder.