I ran package activation and instantiation for a package that specified julia 1.5.4 in julia 1.6.0. I used the specifier julia = "~1.5.4"
, which I believe allows only the patch number to vary. However, there was no error or warning.
I did this:
(@v1.6) pkg> generate .julia/dev/TestPkg
Generating project TestPkg:
.julia/dev\TestPkg\Project.toml
.julia/dev\TestPkg\src/TestPkg.jl
Then I touched Project.toml
adding:
[compat]
julia = "~1.5.4"
And then:
(@v1.6) pkg> dev TestPkg
Path `D:\.julia\dev\TestPkg` exists and looks like the correct package. Using existing path.
Resolving package versions...
julia version requirement for package `TestPkg [5db33cc8]` not satisfied
...
So I did get the warning - although no error, and it did add the package to the Project.toml of the current environment.
If I understand it correctly, the [compat]
section is taken into account when add
-ing or develop
-ing packages, not when activating project environments - there it is the Manifest.toml
what is used to deal with package versions.
Right, but what if I want the compatibility checked when I activate/instantiate a project?