Code Monkey home page Code Monkey logo

Comments (4)

tkaitchuck avatar tkaitchuck commented on August 16, 2024

Are you saying that you have a build of the compiler where: version_check::supports_feature("specialize") returns true, but where the feature is not actually supported? Is that a bug in the compiler, in version_check, or an oddity due to running with a custom build of the compiler? Is there a different way to detect this that would not give incorrect results?

Longer term, I am planning a 1.0 release of the crate which will remove all specialization. The current design of the feature makes code using it way too complex and verbose to be practically maintainable. My plan to avoid the performance hit is just to require the application to invoke different methods to instantiate the Builder because in general the type of the key of a map is almost always known at the instantiation site.

Obviously a new version won't affect exiting packages which depend on existing versions of the crate. Do you need a work around for existing package versions?

from ahash.

alexcrichton avatar alexcrichton commented on August 16, 2024

More-or-less that's the situation yeah. When the build script is invoked in the Rust build system the RUSTFLAGS setting doesn't 100% reflect the flags the crate is going to build with. The build script thinks it has access to all nightly features but the crate itself is compiled with an extra -Zallow-features flag which doesn't actually list the feature. This is due to build-system-of-rust-itself shenanigans and I believe is difficult to change.

As for the time being no workaround is urgent as things have already landed in rust-lang/rust#126967 where extra features were allowed for specialization here. Due to the tool not actually needing specialization or performance wins it would ideally be best to remove the need for specialization to avoid unnecessary dependencies.

from ahash.

tkaitchuck avatar tkaitchuck commented on August 16, 2024

Would this fix the detection issue? SergioBenitez/version_check#22

from ahash.

alexcrichton avatar alexcrichton commented on August 16, 2024

Unfortunately I think not, not because that PR doesn't work though. It's that the compiler flags the build scripts sees are different than the crate itself due to the way the bootstrap build works

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.