Taaitaaiger / jlrs

Julia bindings for Rust
MIT License
407 stars 22 forks source link

Compile error in jlrs_macros #132

Open 0xg0nz0 opened 4 weeks ago

0xg0nz0 commented 4 weeks ago

This happens straight away with an empty project and "cargo add jlrs":

error[E0425]: cannot find value `SELECTED_MINOR_VERSION` in this scope
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/jlrs-macros-0.2.1/src/version.rs:198:21
    |
6   | const LTS_MINOR_VERSION: usize = 6;
    | ----------------------------------- similarly named constant `LTS_MINOR_VERSION` defined here
...
198 |     Version::new(1, SELECTED_MINOR_VERSION)
    |                     ^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `LTS_MINOR_VERSION`

For more information about this error, try `rustc --explain E0425`.
error: could not compile `jlrs-macros` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

$ rustc --version
rustc 1.78.0 (9b00956e5 2024-04-29)
$ julia --version
julia version 1.10.4
$ uname -a
Linux 08bd2080793d 6.6.26-linuxkit #1 SMP Sat Apr 27 04:13:19 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
0xg0nz0 commented 4 weeks ago

My bad -- I think this is because I need to explicitly add to Cargo.toml, "cargo add" won't work:

jlrs = {version = "0.19.0", features = ["sync-rt", "julia-1-10"]}
Taaitaaiger commented 3 weeks ago

Yeah, a version feature must be enabled to deal with backwards-incompatible changes in the C API. It would be nice if it didn't fail but showed a warning if none are enabled instead