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

Replace fxhash with rustc-hash #3502

Merged
merged 4 commits into from
Mar 1, 2023
Merged

Conversation

james7132
Copy link
Contributor

@james7132 james7132 commented Feb 20, 2023

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Fixes #3369.

Description
Changes all dependencies that currently depend on fxhash to use rustc-hash instead, which should be a drop-in replacement that is both maintained and hit 1.0. Brings it into line with naga, which is using rustc-hash.

Testing
All of the crates in the workspace build properly.

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@cwfitzgerald
Copy link
Member

Format mad

@teoxoy teoxoy mentioned this pull request Feb 22, 2023
@cwfitzgerald cwfitzgerald enabled auto-merge (squash) March 1, 2023 18:32
@cwfitzgerald cwfitzgerald merged commit 6ee0d4c into gfx-rs:master Mar 1, 2023
@brody4hire
Copy link
Contributor

Quoting a note I added to #6999 for the record on this update (apologies in advance for all the notes spam):

  • Both fxhash and rustc-hash are in the dependency tree #3369 / PR Replace fxhash with rustc-hash #3502 - it looks to me like the old fxhash crate was some kind of copy of the hasher from rustc-hash. I think it was 100% 200% correct to drop use of the old fxhash in favor of rustc-hash. My one issue with rustc-hash is that it seems to contain both FxHasher, which can be used with hashbrown, and FxHashMap / FxHashSet typedefs which are hard-coded to using std::collections. So moving forward, we should use rustc_hash::FxHasher but not rustc_hash::FxHashMap or rustc_hash::FxHashSet.

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

Successfully merging this pull request may close these issues.

Both fxhash and rustc-hash are in the dependency tree
4 participants