Skip to content

Release v0.3.3 relies on Rust 1.51 features without raising the minor version #409

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

Open
ridwanabdillahi opened this issue Aug 26, 2022 · 2 comments

Comments

@ridwanabdillahi
Copy link

ridwanabdillahi commented Aug 26, 2022

Release v0.3.3 of the plotters crate addressed an issue about raising the MSRV from 1.46 to 1.56 without incrementing the minor version. See issue here: #398

This change also included a new dependency on new features such as the unsigned_abs feature which was not stabilized in the Rust compiler until the 1.51 release of the toolchain.

This is currently breaking dependencies such as the http crate which has an MSRV of Rust 1.49 and takes a dependency on the plotters crate. Is there a way to resolve this issue such as removing the dependency on features that were stabilized after the Rust 1.46 release since the minor version is not being incremented in this release?

Example:
Building the http crate using the Rust 1.49.0 toolchain, the MSRV for the crate, I get the following compilation error:

error[E0658]: use of unstable library feature 'unsigned_abs'
   --> ...\registry\src\g.yxqyang.asia-1ecc6299db9ec823\plotters-0.3.3\src\chart\builder.rs:256:51
    |
256 |         self.label_area_size[pos as usize] = size.unsigned_abs();
    |                                                   ^^^^^^^^^^^^
    |
    = note: see issue #74913 <https://github.com/rust-lang/rust/issues/74913> for more information

   Compiling tinytemplate v1.2.1
error[E0658]: use of unstable library feature 'unsigned_abs'
   --> ...\registry\src\g.yxqyang.asia-1ecc6299db9ec823\plotters-0.3.3\src\style\font\font_desc.rs:157:15
    |
157 |         Ok((w.unsigned_abs(), h.unsigned_abs()))
    |               ^^^^^^^^^^^^
    |
    = note: see issue #74913 <https://github.com/rust-lang/rust/issues/74913> for more information

error[E0658]: use of unstable library feature 'unsigned_abs'
   --> ...\registry\src\g.yxqyang.asia-1ecc6299db9ec823\plotters-0.3.3\src\style\font\font_desc.rs:157:33
    |
157 |         Ok((w.unsigned_abs(), h.unsigned_abs()))
    |                                 ^^^^^^^^^^^^
    |
    = note: see issue #74913 <https://github.com/rust-lang/rust/issues/74913> for more information

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `plotters`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

The unsigned_abs feature was stabilized in Rust 1.51.0.

This compilation error did not exist in plotters v0.3.1

@Monadic-Cat
Copy link
Contributor

Monadic-Cat commented Oct 22, 2022

Just gonna add the information that building http without its tests works just fine, since plotters is a dev-dependency via criterion over there.

This should probably be addressed. It's still a problem for anyone who wants to run http's tests on version 1.49 (like their CI).
These are the options which come to mind for dealing with this:

  • Release a new version which avoids the 1.51 features, then bump x in 0.x.y to release the latest stuff.
  • Try to get criterion to release a new version in that old series which pins its plotters dependency specifically, as we know no future versions will support this MSRV.
  • Get http to separate its benchmarking dependencies from its testing ones. This is inconvenient, but could be done with a Cargo feature. Or by running benchmarks as their own entirely separate crate.
  • Get http to commit a Cargo.lock to its repository, which pins the plotters version. I believe this might do more harm than good, because it would prevent their CI from noticing problems in newer versions of dependencies they use. But, strictly speaking, it is an option.
  • Get http to raise its MSRV too. I dunno if this is reasonable, but it, too, is technically an option.

(To be clear, I'd be willing to make the PRs for any of these.)

@Monadic-Cat
Copy link
Contributor

Of course, there's the question of whether an MSRV of 1.49 at this point is reasonable. To which I say: "I dunno. I don't really think it is, but this isn't my crate and neither is http."

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

No branches or pull requests

2 participants