Pkg3 again


Hello All,

I have to admit that I am still totally lost with Pkg3. I just do not understand its internals despite reading docs and watching JuliaCon videos.

My current problem is as follows. I have created an extension of Flux for Multiple-Instance Learning (called Mill I have tagged versions in git and in Project.toml. In past versions, I have used unregistered package KissThreads, but I have removed. This has somehow caused a havoc. Since the Mill is not registered, I want to add it as a dependency to my other projects.

The problem is that I receive a following error about unsatisfiable dependency.

(tmp) pkg> add
  Updating registry at `~/.julia/registries/General`
  Updating git-repo ``
  Updating git-repo ``
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package KissThreading [36cdf07b]:
 KissThreading [36cdf07b] log:
 ├─KissThreading [36cdf07b] has no known versions!
 └─restricted to versions * by Mill [1d0525e4] — no versions left
   └─Mill [1d0525e4] log:
     ├─possible versions are: 1.1.0 or uninstalled
     └─Mill [1d0525e4] is fixed to version 1.1.0

Thanks for an help.


It is still there:


Thanks Fredrik,

what is weird is that when I click on tagged version v1.2, than it is not there? I will try to fix this.


Thanks, ti works by now. So the problem was the lack of knowledge of git.


Note also that Pkg does not care about the git tags, so when you do pkg> add url you will always get the master branch. However, you can specify a git reference to checkout after a #, so e.g. this works and installs your tagged v1.2 version:

pkg> add


Hi Frederik,

thanks for explanation. I have therefore one more question. Does Pkg care about the tag in git or about the tag in Project.toml. What happens, if those two are different?


What matters from the perspective of Pkg is your Project.toml, but the thing that gets put into your Project.toml by Pkg (if you use the URL) depends on what’s in git.

Personally, I do my utmost not to look at either Project.toml or Manifest.toml of I can avoid it, and basically. Use Pkg.status() to see what Pkg thinks is there, and definitely never edit it by hand unless absolutely necessary (which it rarely is).


I don’t think you can avoid it, eg for adding target dependencies. Cf


Do I understand correctly that version number in Project.toml gets populated when I add the repository from github?


It does not care about git tags.

The version in the project file is only used when a package is in a checked out state (e.g. deved or if you have added a branch or similar).


Right, that’s a case where it’s absolutely necessary :laughing: