Should I be able to cycle through Pkg.([add, develop, free, rm]) with either unregistered
or local packages?
(That was notation not Julia)
Pkg.free() seems to fall-over.
What do you mean by cycle through? Usually when you run Julia in the folder of the Repo of the local (unregistered) package you can do ] add .
to add it? Similarly develop or rm (I have not tried free)
you mean should you be able to add, develop, free or rm unregistered packages? Yes, though free
will probably only do something after pin
This is the way it goes with 1.6.4:
https://gist.github.com/j-fu/9deaa9d117e617c00a8e37bb20ad30af
That means that one needs to replace free
by rm
+add
. It doesn't seem to be a bug. And no, pin
doesn't change this (tried).
ah, I see what you mean now
In my 1.8-DEV branch, I get
(@v1.8) pkg> free BigNums
ERROR: unable to free unregistered package `BigNums [0882b250]`
I think the reason is that add
of a local path doesn't have any idea which versions of a package exist - after all, that is managed by the registry
so if you'd do free
of an unregistered package you've dev
ed, it has no idea what to fall back to - there is no dependency resolution to run, precisely because it's not registered
though one way to possibly alleviate that is by using something like LocalRegistry.jl
Sure, LocalRegistry.jl can help to manage this. I didn't try it out in this particular situation, but it is not complicated to use and it can help to take advantage of the Pkg resolver etc. with packages developed in an organization or at early development stages. AFAIK one e.g. can register 0.0.x versions locally, and starting with 0.1.0 register in General, and Pkg will handle this smoothly.
Last updated: Nov 06 2024 at 04:40 UTC