GithubHelp home page GithubHelp logo

Comments (19)

Kobzol avatar Kobzol commented on June 12, 2024 35

It seems that a lot of stuff depends on ahash < 0.8. It would be indeed useful if it was possible to put out a backported patch release for 0.7.

from ahash.

RalfJung avatar RalfJung commented on June 12, 2024 27

Fundamentally this is caused by logic in build.rs that auto-enables a nightly feature when it detects that it is built with a nightly rustc. Such logic is fragile and prone to errors as nightly features evolve before stabilization.

Crates should never automatically enable nightly features, this should generally be opt-in. If they try to do it automatically they need to be very careful and account for the fact that nightly features are not stable, and might look very different in future nightly versions.

I see aHash still does the same kind of auto-detection with the specialize feature. That's a similar issue just waiting to happen.

from ahash.

mina86 avatar mina86 commented on June 12, 2024 12

If you’re on 0.8 branch → update to 0.8.7. See #188.

However, I’m also picking up dependency on 0.7.7 through chain of older dependencies (borsh 0.9 → hashbrown 0.11 → ahash 0.7) which I can’t easily get rid of on my side. It’d be fantastic if we could get backport to 0.7 branch as well. I’ve commented that in #188.

from ahash.

Kobzol avatar Kobzol commented on June 12, 2024 7

This is caused by rust-lang/rust#117372. This problem in ahash was already fixed in #183, which was released in 0.8.7 (it just isn't visible as a GitHub release).

from ahash.

Kobzol avatar Kobzol commented on June 12, 2024 6

Don't forget that you have to cargo update ahash to actually get the newest version (either 0.7.8 or 0.8.7+).

from ahash.

janu-cambrelen avatar janu-cambrelen commented on June 12, 2024 5

For those in this situation and if your workflow permits, pinning the Rust nightly version to an earlier date might serve as a temporary measure to get unblocked, particularly if you're facing the unknown feature 'stdsimd' error with ahash-0.7.7:

# install specific nightly version (i.e., `2024-02-01`)
rustup toolchain install nightly-2024-02-01

# use this nightly version for your commands
cargo +nightly-2024-02-01 build

This is not, of course, a solution to the issue, but rather a workaround that may help in the interim until a more permanent fix is available.

from ahash.

marvin-bitterlich avatar marvin-bitterlich commented on June 12, 2024 5

Thank you everyone for the quick resolution!

For folks who have both versions in their deps, here is a quick fix that doesn't require clean:

cargo update [email protected]
cargo update [email protected]

from ahash.

vikingSec avatar vikingSec commented on June 12, 2024 3

Seems like this is breaking trunk and leptos

I was just trying to get into learning leptos, so installing all of the right versions according to the docs and trying to install trunk and cargo-leptos both runs into this bug.

Console output:

> cargo install trunk
error[E0635]: unknown feature `stdsimd`
  --> /Users/medwards/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.7/src/lib.rs:33:42
   |
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
   |                                          ^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `trunk v0.18.7`, intermediate artifacts can be found at `/var/folders/9f/w50rg2wj193fh6jv5rt0lk1r0000gn/T/cargo-installif2CRL`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path. 

Not trying to brigade the comments, I'd work on a fix but you probably don't want a Rust noop running around your repo.

from ahash.

Manishearth avatar Manishearth commented on June 12, 2024 3

Would it be possible to remove the build.rs check in the 0.7 series as @mina86 mentions? 0.8 fixes this but:

  • Not everyone has upgraded to it
  • This affects MSRV

Fundamentally this is caused by logic in build.rs that auto-enables a nightly feature when it detects that it is built with a nightly rustc. Such logic is fragile and prone to errors as nightly features evolve before stabilization.

I agree with Ralf here: crates shouldn't do this. It makes life harder for crates attempting to support a range of versions: they're either broken on the new version due to the missing feature, or broken on the old version due to an unstable feature.

from ahash.

tkaitchuck avatar tkaitchuck commented on June 12, 2024 2

Fixed via #201, and released as 0.7.8

from ahash.

tusharmath avatar tusharmath commented on June 12, 2024

Facing similar issue.

from ahash.

tmpfs avatar tmpfs commented on June 12, 2024

Same here on version 0.7.7, it's broken my crate's documentation build on docs.rs but works fine for me locally on Linux and MacOS, not sure why it's only broken in the docs.rs sandbox environment.

Here is the build log:

https://docs.rs/crate/sos-sdk/0.10.0/builds/1116456

from ahash.

humb1t avatar humb1t commented on June 12, 2024

Same for me

from ahash.

Manishearth avatar Manishearth commented on June 12, 2024

Opened #202

Looks like this feature was already disabled in #183

from ahash.

Kobzol avatar Kobzol commented on June 12, 2024

Same as #201?

from ahash.

Manishearth avatar Manishearth commented on June 12, 2024

Almost. #202 gets us out of the detection business entirely, which is what was already landed in #183

from ahash.

ozgrakkurt avatar ozgrakkurt commented on June 12, 2024

Why not juse use crates.io version of the thing or something like that? This is a huge pain, all of the dependencies are littered with this and it is impossible to compile on an M1 with stable toolchain

from ahash.

Temidayo32 avatar Temidayo32 commented on June 12, 2024

I am still experiencing the issue. I installed the latest stable

from ahash.

scambier avatar scambier commented on June 12, 2024

I am still experiencing the issue. I installed the latest stable

Working for me with 0.8.8. Don't forget to cargo clean

from ahash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.