tkaitchuck / constrandom

Macro to generate random constants in Rust https://xkcd.com/221/
Apache License 2.0
73 stars 14 forks source link

Release 0.1.10 breaks support for stable toolchain #17

Closed akien-mga closed 4 years ago

akien-mga commented 4 years ago

Compiling bevy which uses your crate, I run into an error with stable Rust (1.46.0) since the release of 0.1.10 on crates.io:

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /home/akien/.cargo/registry/src/github.com-1ecc6299db9ec823/const-random-macro-0.1.10/src/lib.rs:1:1
  |
1 | #![feature(proc_macro_quote)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Pinning to 0.1.8 fixes it.

Edit: I know that using the nightly toolchain would fix it, but I'm reporting this in case you didn't intend to make const-random-macro a nightly-only crate.

dvdplm commented 4 years ago

Also breaks e.g. https://github.com/jonhoo/inferno

reyk commented 4 years ago

And ahash, hashbrown and many other crates that depend on it indirectly.

ShaleXIONG commented 4 years ago

I have a similar problem when compiling clap under nightly-2020-05-07

error[E0658]: procedural macros cannot be expanded to expressions
  --> /home/shaxio01/.cargo/registry/src/github.com-1ecc6299db9ec823/const-random-macro-0.1.10/src/lib.rs:33:13
   |
33 |             quote!(($value as usize))
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
   = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
vmx commented 4 years ago

In case you are blocked by this while developing, you can use my branch for now until this is resolved (in whichever way). Just patch the dependency in the root Cargo.toml of your project like this:

[patch.crates-io]
const-random-macro = { git = "https://github.com/vmx/constrandom", branch = "back-to-stable" }
Ten0 commented 4 years ago

Shouldn't 0.1.10 be yanked because of this?

tkaitchuck commented 4 years ago

@Ten0 It has been.