I am trying to install… or register, or record a package with a particular version number via (v0.7) pkg> dev packagepath, but am unable to do this. The package is LambertW, which is registered. Pkg will only add it to Project.toml with a very old version number. I have tried both local repos and the registered package on github. Here is an example:
(v0.7) pkg> preview dev /home/lapeyre/.julia/dev/LambertW#master
───── Preview mode ─────
┌ Warning: packages will need to have a [Julia]Project.toml file in the future
└ @ Pkg.Types Types.jl:603
Resolving package versions...
Installed Revise ─ v0.5.4
Installed Arpack ─ v0.1.4
Updating `~/.julia/environments/v0.7/Project.toml`
[e24f45a5] ? InverseLaplace v0.0.3+ [`~/.julia/dev/InverseLaplace`] ⇒ v0.2.0+ [`~/.julia/dev/InverseLaplace`]
[984bce1d] + LambertW v0.2.0+ [`~/.julia/dev/LambertW`]
Updating `~/.julia/environments/v0.7/Manifest.toml`
[e24f45a5] ? InverseLaplace v0.0.3+ [`~/.julia/dev/InverseLaplace`] ⇒ v0.2.0+ [`~/.julia/dev/InverseLaplace`]
[984bce1d] + LambertW v0.2.0+ [`~/.julia/dev/LambertW`]
Building skipping building in preview mode
The master branch (which I specify explicitly) is tagged v0.4.0. The tag v0.2.0 is a couple of years old. The latest version here
~/.julia/v0.7/METADATA/LambertW/versions/
is v0.2.0. But, I’d like to ignore this, and just use a local package, for now. This is actually holding up development on another package that depends on LambertW v0.4.0. I am using a REQUIRE file for this. Maybe I have to switch to Project.toml in order to specify a non-registered location. In any case this dependency has been removed, and will stay that way until I am able to “develop” LambertW v0.4.0.
I know that version is always in Manifest.toml, but it was my understanding that only Project.toml is mandatory, and in that one usually there is no explicit version.
Could you guys also clarify whether Manifest.toml should be included in repos?
I have wondered about this too, so this is how I would phrase the question: suppose I install a package (with add or dev) that has a Project.toml but no Manifest.toml, how are the versions that are used to populate Manifest.toml determined? Is it the “latest” feasible solution (not sure that is well-defined, but least up to a partial ordering), or just “a” feasible solution?
Ohhhh, that clarifies, soooo much thanks! I think that has been my main source of confusion about this whole thing, it must not have been in the docs at the time when I read them. Anyway, I’m really liking this setup! In particular, I like that it defaults to getting most recent tagged versions of everything. Looking forward to using it more now that I understand what’s going on.
I agree its not a good idea. But, I could find no other way to work with the version I want.
In any case. My solution above does not work:
(v0.7) pkg> preview resolve
───── Preview mode ─────
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LambertW [0b6a3af8]:
LambertW [0b6a3af8] log:
├─possible versions are: 0.0.0 or uninstalled
├─LambertW [0b6a3af8] is fixed to version 0.0.0
└─restricted to versions 0.4.0 by an explicit requirement — no versions left
I’ll think I’ll wait until version 0.4.0 is in METADATA.
I keep getting errors like └─restricted to versions 0.0.0 by an explicit requirement — no versions left when trying to dev my own packages. I don’t know why. I can’t find any Manifest.toml files that say 0.0.0.
The problem is I have no idea how to actually fix anything when something goes wrong, so I feel like I’m forced to delete everything and start over whenever there’s a problem.
Maybe I can try and edit all the instances of “0.1.0” I find for that package, replacing them with “0.0.0”, and hope that works?
This typically means you have an unregistered package without a project file or a project file without a version entry.
If you have examples that fail, don’t be afraid of opening issues on the Pkg repo. Pkg is new, so better documentation and error messages etc are needed but those are much easier to add based on feedback from users than just coming up with examples in your head.
(Pkg) pkg> dev https://github.com/chriselrod/TriangularMatrices.jl
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating git-repo `https://github.com/chriselrod/TriangularMatrices.jl`
[ Info: Path `/Users/kristoffer/.julia/dev/TriangularMatrices` exists and looks like the correct package, using existing path instead of cloning
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package TriangularMatrices [5ebe76dc]:
TriangularMatrices [5ebe76dc] log:
├─possible versions are: 0.0.0 or uninstalled
├─TriangularMatrices [5ebe76dc] is fixed to version 0.0.0
└─restricted to versions 0.1.0 by an explicit requirement — no versions left
julia> import Pkg # Load Pkg with fix
(Pkg) pkg> dev https://github.com/chriselrod/TriangularMatrices.jl
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating git-repo `https://github.com/chriselrod/TriangularMatrices.jl`
[ Info: Path `/Users/kristoffer/.julia/dev/TriangularMatrices` exists and looks like the correct package, using existing path instead of cloning
Resolving package versions...
Updating `Project.toml`
[5ebe76dc] + TriangularMatrices v0.0.0 [`~/.julia/dev/TriangularMatrices`]
Edit: The PR needs some fixup but it is mostly correct. At least I know the problem.
Saw tests failed for today. Once they’re fixed and fixes are merged in Pkg master, what’s the easiest way to check them out locally? I know we don’t need the same Julia and standard lib versions. My first try was simply:
(v1.0) pkg> add Pkg#master
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: The following package names could not be resolved:
* Pkg (44cfe95a-1eb2-52ea-b672-e2afdf69b78f in manifest but not in project)
Please specify by known `name=uuid`.