Julia version compatibilty entry in 'Project.toml' does not have expected effect

I’m working on a project that uses Turing.jl as one of it’s dependencies. Turing is as of today not compatible with Julia 1.7, so I’m working with 1.5.4 at the moment. In ‘Project.toml’ I have tried to make that compatibility issue explicit as follows:

[compat]
julia = "< 1.7.0" 

My expectation was that when working in Julia >1.7.0 and trying to activate the project, some sort of warning or error message would come up, but none of this happens. Instead, when I work from Julia 1.7 and then precompile the project I get the following error:

(@v1.7) pkg> activate .
  Activating project at `.`

(recourse) pkg> precompile
┌ Warning: The active manifest file is an older format with no julia version entry. Dependencies may have been resolved with a different julia version.
└ @ ./Manifest.toml:0
Precompiling project...
  ✗ CUDA
  ✗ Flux
  0 dependencies successfully precompiled in 9 seconds (220 already precompiled)

Is there any way to specify that the project and contained tutorials (notebooks) are not compatible with Julia 1.7?

Many thanks :slight_smile:

The compat of Turing.jl is:

[compat]
julia = "1.3, 1.4, 1.5, 1.6"

which is

[1.3.0,2.0)

Is this an issue of Turing? Or am I wrong? I am always unsure with these things.

For your question (or start of a discussion) I am unsure too. Perhaps a Pkg command which checks current versions of installed packages in current environment would be nice. Doing it automatically on every environment change (and julia startup) could be some new “time to first plot”-problem as environments tend to become quite large. But perhaps it can still be done very quickly, so not an issue. Unsure I am.

As environment changes are typically done by purpose in a conscious/aware circumstance I think it should not be checked, as the developer should know what he is doing when using environments.

But checking before/during precompilation could be an idea.

(just some thoughts for discussion)

1 Like