Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSRV for rust-numpy #176

Closed
mtreinish opened this issue Mar 10, 2021 · 6 comments · Fixed by #177
Closed

MSRV for rust-numpy #176

mtreinish opened this issue Mar 10, 2021 · 6 comments · Fixed by #177

Comments

@mtreinish
Copy link
Contributor

Following PyO3/pyo3#1420 and PyO3/pyo3#1431 PyO3's MSRV is 1.41. Right now rust-numpy advertises the msrv of 1.39 in the README, but because ndarray 0.14 is listed as a dependency the functional msrv is 1.42 since the ndarray 0.14 release bumped their msrv (https://github.com/rust-ndarray/ndarray/blob/master/RELEASES.md#other-changes-1 )

I'm hoping to clarify the rust-numpy MSRV policy because this is blocking me from upgrading pyo3 (see: Qiskit/rustworkx#238 ) because I'm trying to maintain rust 1.41 compatibility for debian users. Once the policy is clarified for rust-numpy we can add a CI job to enforce it like we have in pyo3.

@kngwyu
Copy link
Member

kngwyu commented Mar 11, 2021

Ah, sorry for my laziness about it and thank you for letting me know that!

  • Checks if we support ndarray 0.13 and 0.14
  • Release a patch version if we can do something
  • Or just update the README

@kngwyu
Copy link
Member

kngwyu commented Mar 13, 2021

@mtreinish
I think we can support ndarray 0.13 by ndarray = ">= 0.13, < 0.15".
However, cargo doesn't nicely resolve the proper version so we have to edit Cargo.lock for making it work.
Does it sufficient for you?
Or, -Z minimal-version could work, but I haven't tried it by myself.

@davidhewitt
Copy link
Member

If we put ndarray = ">= 0.13, < 0.15" in our Cargo.toml, then for downstream users which have ndarray = 0.13 I think cargo can deduplicate and use 0.13 correctly.

We could test this in CI with an example.

@mtreinish
Copy link
Contributor Author

@kngwyu I think changing the ndarray dependency to ndarray = ">= 0.13, < 0.15" will work well for me. I tested that locally and it works for building with 1.41. As @davidhewitt suggested cargo is able to resolve things correctly when ndarray = 0.13 and rust-numpy has >=0.13, < 0.15.

One other place we might need to loosen the requirements in rust-numpy is num-complex. ndarray 0.13 uses num-complex 0.2: https://github.com/rust-ndarray/ndarray/blob/0.13.1/Cargo.toml#L33 while we have num-complex = 0.3. Things for me compile fine locally and cargo just builds with num-complex 0.2 for ndarray and 0.3 for rust-numpy, but I haven't tested anything which uses complex numbers so I'm not sure if there will be a version mismatch for users that use arrays with complex numbers.

@kngwyu
Copy link
Member

kngwyu commented Mar 15, 2021

Ah, OK, thank you both for pointing it out!

@kngwyu
Copy link
Member

kngwyu commented Mar 17, 2021

Released 0.13.1, which would work with Rust 1.41.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants