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

proc_macro2 1.0.33 causing breakages with rust-1.57-nightly #307

Closed
maxburke opened this issue Dec 7, 2021 · 5 comments
Closed

proc_macro2 1.0.33 causing breakages with rust-1.57-nightly #307

maxburke opened this issue Dec 7, 2021 · 5 comments

Comments

@maxburke
Copy link

maxburke commented Dec 7, 2021

Since 1.0.33 was published many of our builds started failing with the following error:

error[E0658]: use of unstable library feature 'proc_macro_is_available'
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.33/src/detection.rs:28:21
   |
28 |     let available = proc_macro::is_available();
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #71436 <https://github.com/rust-lang/rust/issues/71436> for more information
   = help: add `#![feature(proc_macro_is_available)]` to the crate attributes to enable
For more information about this error, try `rustc --explain E0658`.
error: could not compile `proc-macro2` due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-deny v0.11.0`, intermediate artifacts can be found at `/tmp/cargo-installKTra1Y`

This is the toolchain version we are on:

$ rustc --version
rustc 1.57.0-nightly (f03eb6bef 2021-10-02)

We've been stepping back to earlier versions of the package where we can but for some things (like cargo-deny above) we're having trouble with.

@dtolnay
Copy link
Owner

dtolnay commented Dec 7, 2021

rustc 1.57.0-nightly (f03eb6bef 2021-10-02) is an old nightly toolchain. This crate in general does not support arbitrary old nightly toolchains.

@dtolnay dtolnay closed this as completed Dec 7, 2021
@maxburke
Copy link
Author

maxburke commented Dec 7, 2021

I understand that supporting "arbitrary old nightly toolchains" is burdensome as a package maintainer. We need to use a nightly toolchain because some of our critical dependencies rely on features not yet stabilized, we would be on stable versions if not for that.

But it also really sucks to have your whole build system grind to a halt because of a patch version update.

@dtolnay
Copy link
Owner

dtolnay commented Dec 7, 2021

This is up to you. The expectation when using the nightly toolchain is that you pull in the new one every 'night'. If you are pinning the toolchain to an old nightly, then you need to pin your crates too.

jrose-signal added a commit to signalapp/libsignal that referenced this issue Dec 10, 2021
...because the fuzz target doesn't have a lockfile, and crates don't
generally support arbitrary nightly versions. See
dtolnay/proc-macro2#307 for an example.
@kaleidawave
Copy link

Having this issue developing with rustc 1.55.0 (c8dfcfe04 2021-09-06), so have pinned crate version to 1.0.32. Given proc_macro::is_available(); was stabilised at 1.57, shouldn't the rust-version in cargo toml be 1.57? (I am a bit of noob on versioning so I am probably wrong ...?)

Repository owner locked and limited conversation to collaborators Dec 12, 2021
@dtolnay
Copy link
Owner

dtolnay commented Dec 12, 2021

The rust-version in Cargo.toml is accurate. This crate supports every stable compiler since the number shown there. As stated above though, this crate does not support arbitrary old nightly toolchains.

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

No branches or pull requests

3 participants