precice / PreCICE.jl

Julia language bindings for preCICE
GNU Lesser General Public License v3.0
11 stars 1 forks source link

Warn user, if julia version is too old #15

Closed BenjaminRodenberg closed 2 years ago

BenjaminRodenberg commented 2 years ago

I just tried using the julia bindings and (of course) did not read the documentation properly. I installed julia via sudo apt install julia and got version 1.4.1. This led to an error when trying to run the solverdummies. By upgrading julia to version 1.7.2 I managed to resolve this error.

Is it possible to warn the user or throw an error, if the julia version is too old? This would help users like me that do not read properly.

erikscheurer commented 2 years ago

It is possible to change the compatibility in Project.toml to the last compatible version. Then the user gets a message when installing the bindings. However, unless you have julia version 0.x then its not a warning but just a message:

(@v1.4) pkg> dev ./julia-bindings/
Path `./julia-bindings/` exists and looks like the correct package. Using existing path.
  Resolving package versions...
julia version requirement for package `PreCICE [57fbd4af]` not satisfied
   Updating `~/.julia/environments/v1.4/Project.toml`

The package manager also allows for different compatibility systems where from my understanding the caret specifier would be the correct choice.

IshaanDesai commented 2 years ago

@erikscheurer the ideal thing that we want is that the installation of the bindings does not proceed if Julia version is < 1.6. The user should then receive an error about the incompatible Julia version. As we know that the bindings do not work with earlier Julia versions than 1.6, we can straight away drop support for them and just produce an Error.

Can you open a pull request with such an implementation using either of the strategies you mentioned above?