Stream: helpdesk (published)

Topic: Package has no known versions! when using Pkg.develop


view this post on Zulip disberd (Jul 03 2021 at 08:55):

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?

view this post on Zulip Fredrik Ekre (Jul 03 2021 at 08:58):

I don't quite understand what you did to get that error. Can you elaborate?

view this post on Zulip Fredrik Ekre (Jul 03 2021 at 08:59):

Ah, nevermind missed the first sentence. Yea, you would need to add PlutoDevMacros before dev Test

view this post on Zulip disberd (Jul 03 2021 at 09:06):

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

view this post on Zulip Fredrik Ekre (Jul 03 2021 at 09:08):

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

view this post on Zulip disberd (Jul 03 2021 at 09:10):

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)

view this post on Zulip Fredrik Ekre (Jul 03 2021 at 09:13):

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.

view this post on Zulip disberd (Jul 03 2021 at 09:35):

Ah funny enough i never had this happen in the past so I was quite puzzled

view this post on Zulip disberd (Jul 03 2021 at 09:35):

Thanks again!

view this post on Zulip Fredrik Ekre (Jul 03 2021 at 09:39):

It should happen everytime you add/dev a dependency which has dependencies that are not in the registry or the current environment.

view this post on Zulip disberd (Jul 03 2021 at 11:33):

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