Hi,
I am facing some weird issue when trying to include a very simple package I uploaded on a github repo in a file I am developing.
The small package on github is located at:
https://github.com/disberd/PlutoDevMacros
I tried creating a test package using Pkg.generate("Test")
and then simply added my own github package using ]add https://github.com/disberd/PlutoDevMacros
.
All seems fine but when I try to add this Test package with ]dev Test\\
I get the following error:
ERROR: Unsatisfiable requirements detected for package PlutoDevMacros [a0499f29]:
PlutoDevMacros [a0499f29] log:
├─PlutoDevMacros [a0499f29] has no known versions!
└─restricted to versions * by Test [5e82cda8] — no versions left
└─Test [5e82cda8] log:
├─possible versions are: 0.1.0 or uninstalled
└─Test [5e82cda8] is fixed to version 0.1.0
I am using:
Julia Version 1.7.0-beta2
Commit b570546b68 (2021-06-20 06:31 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.0 (ORCJIT, skylake)
I tried removing the registry and completely removing the .julia
folder as I found these suggestions on internet but none of them worked.
Can anyone help me fix this issue?
I don't quite understand what you did to get that error. Can you elaborate?
Ah, nevermind missed the first sentence. Yea, you would need to add PlutoDevMacros
before dev Test
I actually did that, here is my test workflow:
julia> mktempdir() |> cd
julia> import Pkg
julia> Pkg.generate("TestPkg")
Generating project TestPkg:
TestPkg\Project.toml
TestPkg\src/TestPkg.jl
Dict{String, Base.UUID} with 1 entry:
"TestPkg" => UUID("85915433-e56f-4fae-8e0e-18f29689aba9")
julia> Pkg.activate("TestPkg")
Activating project at `C:\Users\ALBERT~1\AppData\Local\Temp\jl_4nxNIO\TestPkg`
julia> Pkg.add(url="https://github.com/disberd/PlutoDevMacros",rev="master")
Updating git-repo `https://github.com/disberd/PlutoDevMacros`
.
.
.
Precompiling project...
2 dependencies successfully precompiled in 5 seconds
Pkg.activate(temp=true)
Activating new project at `C:\Users\ALBERT~1\AppData\Local\Temp\jl_6HJ2eO`
Pkg.develop(path=".//TestPkg")
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PlutoDevMacros [a0499f29]:
PlutoDevMacros [a0499f29] log:
├─PlutoDevMacros [a0499f29] has no known versions!
└─restricted to versions * by TestPkg [85915433] — no versions left
└─TestPkg [85915433] log:
├─possible versions are: 0.1.0 or uninstalled
└─TestPkg [85915433] is fixed to version 0.1.0
I also just checked on 1.6.0 but still get the error
Right, I meant that you need to Pkg.add(url="https://github.com/disberd/PlutoDevMacros",rev="master")
again after you activate your new temp env
Ah that indeed works!
How come I also need to add it from the current active environment and it is not directly handled by TestPkg directly? (If I am not using anything from PlutoDevMacros in the current active environment)
Because, when you do dev TestPkg
the package manager looks at its project file in order to collect the dependencies. It finds PlutoDevMacros
and it's UUID there, but then chokes since it doesn't know where to find it.
Ah funny enough i never had this happen in the past so I was quite puzzled
Thanks again!
It should happen everytime you add/dev a dependency which has dependencies that are not in the registry or the current environment.
So probably that's because I never included packages not in the registry before that's why!
Last updated: Dec 28 2024 at 04:38 UTC