I am confused by the behaviour of Pkg3. It seems that the
version field in the
Project.toml is ignored and instead the registries determines the latest available version. I would have expected that the local
Project.toml of a
deved package always has priority.
Here is an example, maybe I instead something wrong:
(v1.0) pkg> generate Bar Generating project Bar: Bar/Project.toml Bar/src/Bar.jl (v1.0) pkg> dev ./Bar Resolving package versions... Updating `~/.julia/environments/v1.0/Project.toml` [5a72affa] + Bar v0.1.0 [`~/.julia/environments/v1.0/../../dev/Bar`] Updating `~/.julia/environments/v1.0/Manifest.toml` [5a72affa] + Bar v0.1.0 [`~/.julia/environments/v1.0/../../dev/Bar`]
Now I change the generated
Project.toml and set
version = "0.2.0". Going back to Julia:
(v1.0) pkg> resolve Updating registry at `~/.julia/registries/General` Updating git-repo `https://github.com/JuliaRegistries/General.git` Resolving package versions... ERROR: Unsatisfiable requirements detected for package Bar [5a72affa]: Bar [5a72affa] log: ├─possible versions are: 0.2.0 or uninstalled ├─Bar [5a72affa] is fixed to version 0.2.0 └─restricted to versions 0.1.0 by an explicit requirement — no versions left
I would have expected that Pkg would just recognize that
Bar is now at version 0.2.0.
I run into concrete problems when I wanted to upgrade a dependency (minor version jump) of a package where the dependency is currently limited to the latest minor version. Since Pkg ignores the
version field I cannot upgrade it without having a published new version of my dependency.