mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-03 13:14:41 +00:00
Use rustc-hash instead of fxhash crate (#594)
`fxhash` is the old, less maintained version of this crate (`rustc-hash`). We use the latter in Ruff.
This commit is contained in:
parent
6005d7a552
commit
a24534b0ce
26 changed files with 32 additions and 41 deletions
23
Cargo.lock
generated
23
Cargo.lock
generated
|
|
@ -1070,15 +1070,6 @@ dependencies = [
|
||||||
"slab",
|
"slab",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "fxhash"
|
|
||||||
version = "0.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
|
|
||||||
dependencies = [
|
|
||||||
"byteorder",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "generic-array"
|
name = "generic-array"
|
||||||
version = "0.14.7"
|
version = "0.14.7"
|
||||||
|
|
@ -1479,7 +1470,6 @@ dependencies = [
|
||||||
"distribution-filename",
|
"distribution-filename",
|
||||||
"fs-err",
|
"fs-err",
|
||||||
"fs2",
|
"fs2",
|
||||||
"fxhash",
|
|
||||||
"goblin",
|
"goblin",
|
||||||
"indoc",
|
"indoc",
|
||||||
"mailparse",
|
"mailparse",
|
||||||
|
|
@ -1494,6 +1484,7 @@ dependencies = [
|
||||||
"rayon",
|
"rayon",
|
||||||
"reflink-copy",
|
"reflink-copy",
|
||||||
"regex",
|
"regex",
|
||||||
|
"rustc-hash",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
|
@ -2115,9 +2106,9 @@ name = "platform-tags"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"fxhash",
|
|
||||||
"platform-host",
|
"platform-host",
|
||||||
"puffin-interpreter",
|
"puffin-interpreter",
|
||||||
|
"rustc-hash",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2466,7 +2457,6 @@ dependencies = [
|
||||||
"fs-err",
|
"fs-err",
|
||||||
"fs2",
|
"fs2",
|
||||||
"futures",
|
"futures",
|
||||||
"fxhash",
|
|
||||||
"install-wheel-rs",
|
"install-wheel-rs",
|
||||||
"pep440_rs 0.3.12",
|
"pep440_rs 0.3.12",
|
||||||
"platform-tags",
|
"platform-tags",
|
||||||
|
|
@ -2479,6 +2469,7 @@ dependencies = [
|
||||||
"pypi-types",
|
"pypi-types",
|
||||||
"rayon",
|
"rayon",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
"rustc-hash",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
|
@ -2528,7 +2519,6 @@ dependencies = [
|
||||||
"distribution-types",
|
"distribution-types",
|
||||||
"fs-err",
|
"fs-err",
|
||||||
"futures",
|
"futures",
|
||||||
"fxhash",
|
|
||||||
"install-wheel-rs",
|
"install-wheel-rs",
|
||||||
"pep440_rs 0.3.12",
|
"pep440_rs 0.3.12",
|
||||||
"pep508_rs",
|
"pep508_rs",
|
||||||
|
|
@ -2543,6 +2533,7 @@ dependencies = [
|
||||||
"puffin-traits",
|
"puffin-traits",
|
||||||
"pypi-types",
|
"pypi-types",
|
||||||
"rayon",
|
"rayon",
|
||||||
|
"rustc-hash",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
@ -2575,8 +2566,8 @@ name = "puffin-macros"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"colored",
|
"colored",
|
||||||
"fxhash",
|
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
"rustc-hash",
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -2603,7 +2594,6 @@ dependencies = [
|
||||||
"distribution-types",
|
"distribution-types",
|
||||||
"fs-err",
|
"fs-err",
|
||||||
"futures",
|
"futures",
|
||||||
"fxhash",
|
|
||||||
"gourgeist",
|
"gourgeist",
|
||||||
"http-cache-semantics",
|
"http-cache-semantics",
|
||||||
"insta",
|
"insta",
|
||||||
|
|
@ -2626,6 +2616,7 @@ dependencies = [
|
||||||
"puffin-traits",
|
"puffin-traits",
|
||||||
"pypi-types",
|
"pypi-types",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
"rustc-hash",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
|
|
@ -2643,10 +2634,10 @@ name = "puffin-traits"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"fxhash",
|
|
||||||
"pep508_rs",
|
"pep508_rs",
|
||||||
"puffin-cache",
|
"puffin-cache",
|
||||||
"puffin-interpreter",
|
"puffin-interpreter",
|
||||||
|
"rustc-hash",
|
||||||
"tokio",
|
"tokio",
|
||||||
"waitmap",
|
"waitmap",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ flate2 = { version = "1.0.28" }
|
||||||
fs-err = { version = "2.9.0" }
|
fs-err = { version = "2.9.0" }
|
||||||
fs2 = { version = "0.4.3" }
|
fs2 = { version = "0.4.3" }
|
||||||
futures = { version = "0.3.29" }
|
futures = { version = "0.3.29" }
|
||||||
fxhash = { version = "0.2.1" }
|
|
||||||
git2 = { version = "0.18.1" }
|
git2 = { version = "0.18.1" }
|
||||||
glob = { version = "0.3.1" }
|
glob = { version = "0.3.1" }
|
||||||
goblin = { version = "0.7.1" }
|
goblin = { version = "0.7.1" }
|
||||||
|
|
@ -65,6 +64,7 @@ reqwest = { version = "0.11.22", default-features = false, features = ["json", "
|
||||||
reqwest-middleware = { version = "0.2.4" }
|
reqwest-middleware = { version = "0.2.4" }
|
||||||
reqwest-retry = { version = "0.3.0" }
|
reqwest-retry = { version = "0.3.0" }
|
||||||
rfc2047-decoder = { version = "1.0.1" }
|
rfc2047-decoder = { version = "1.0.1" }
|
||||||
|
rustc-hash = { version = "1.1.0" }
|
||||||
seahash = { version = "4.1.0" }
|
seahash = { version = "4.1.0" }
|
||||||
serde = { version = "1.0.190" }
|
serde = { version = "1.0.190" }
|
||||||
serde_json = { version = "1.0.108" }
|
serde_json = { version = "1.0.108" }
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ csv = { workspace = true }
|
||||||
data-encoding = { workspace = true }
|
data-encoding = { workspace = true }
|
||||||
fs-err = { workspace = true }
|
fs-err = { workspace = true }
|
||||||
fs2 = { workspace = true }
|
fs2 = { workspace = true }
|
||||||
fxhash = { workspace = true }
|
|
||||||
goblin = { workspace = true }
|
goblin = { workspace = true }
|
||||||
mailparse = { workspace = true }
|
mailparse = { workspace = true }
|
||||||
once_cell = { workspace = true }
|
once_cell = { workspace = true }
|
||||||
|
|
@ -42,6 +41,7 @@ pyo3 = { workspace = true, features = ["extension-module", "abi3-py37"], optiona
|
||||||
rayon = { workspace = true, optional = true }
|
rayon = { workspace = true, optional = true }
|
||||||
reflink-copy = { workspace = true }
|
reflink-copy = { workspace = true }
|
||||||
regex = { workspace = true }
|
regex = { workspace = true }
|
||||||
|
rustc-hash = { workspace = true }
|
||||||
serde = { workspace = true, features = ["derive"] }
|
serde = { workspace = true, features = ["derive"] }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
sha2 = { workspace = true }
|
sha2 = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use fxhash::FxHashSet;
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
use rustc_hash::FxHashSet;
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::Error;
|
use crate::Error;
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ use configparser::ini::Ini;
|
||||||
use data_encoding::BASE64URL_NOPAD;
|
use data_encoding::BASE64URL_NOPAD;
|
||||||
use fs_err as fs;
|
use fs_err as fs;
|
||||||
use fs_err::{DirEntry, File};
|
use fs_err::{DirEntry, File};
|
||||||
use fxhash::{FxHashMap, FxHashSet};
|
|
||||||
use mailparse::MailHeaderMap;
|
use mailparse::MailHeaderMap;
|
||||||
|
use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
use sha2::{Digest, Sha256};
|
use sha2::{Digest, Sha256};
|
||||||
use tempfile::tempdir;
|
use tempfile::tempdir;
|
||||||
use tracing::{debug, error, span, warn, Level};
|
use tracing::{debug, error, span, warn, Level};
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,4 @@ platform-host = { path = "../platform-host" }
|
||||||
puffin-interpreter = { path = "../puffin-interpreter" }
|
puffin-interpreter = { path = "../puffin-interpreter" }
|
||||||
|
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
fxhash = { workspace = true }
|
rustc-hash = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::num::NonZeroU32;
|
use std::num::NonZeroU32;
|
||||||
|
|
||||||
use anyhow::{Error, Result};
|
use anyhow::{Error, Result};
|
||||||
use fxhash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use platform_host::{Arch, Os, Platform, PlatformError};
|
use platform_host::{Arch, Os, Platform, PlatformError};
|
||||||
use puffin_interpreter::Interpreter;
|
use puffin_interpreter::Interpreter;
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@ bytesize = { workspace = true }
|
||||||
fs-err = { workspace = true }
|
fs-err = { workspace = true }
|
||||||
fs2 = { workspace = true }
|
fs2 = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
fxhash = { workspace = true }
|
|
||||||
rayon = { workspace = true }
|
rayon = { workspace = true }
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
|
rustc-hash = { workspace = true }
|
||||||
serde = { workspace = true , features = ["derive"] }
|
serde = { workspace = true , features = ["derive"] }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
sha2 = { workspace = true }
|
sha2 = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ use std::collections::BTreeMap;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use fs_err as fs;
|
use fs_err as fs;
|
||||||
use fxhash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
use tracing::warn;
|
use tracing::warn;
|
||||||
|
|
||||||
use distribution_types::{CachedRegistryDist, CachedWheel};
|
use distribution_types::{CachedRegistryDist, CachedWheel};
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use std::sync::Arc;
|
||||||
|
|
||||||
use fs2::FileExt;
|
use fs2::FileExt;
|
||||||
use fs_err::File;
|
use fs_err::File;
|
||||||
use fxhash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ use std::sync::Arc;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use fs_err::tokio as fs;
|
use fs_err::tokio as fs;
|
||||||
use futures::TryStreamExt;
|
use futures::TryStreamExt;
|
||||||
use fxhash::FxHashMap;
|
|
||||||
use reqwest::Response;
|
use reqwest::Response;
|
||||||
|
use rustc_hash::FxHashMap;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ pypi-types = { path = "../pypi-types" }
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
fs-err = { workspace = true }
|
fs-err = { workspace = true }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
fxhash = { workspace = true }
|
|
||||||
rayon = { workspace = true }
|
rayon = { workspace = true }
|
||||||
|
rustc-hash = { workspace = true }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::hash::BuildHasherDefault;
|
use std::hash::BuildHasherDefault;
|
||||||
|
|
||||||
use anyhow::{bail, Context, Result};
|
use anyhow::{bail, Context, Result};
|
||||||
use fxhash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
use tracing::debug;
|
use tracing::debug;
|
||||||
|
|
||||||
use distribution_types::direct_url::{git_reference, DirectUrl};
|
use distribution_types::direct_url::{git_reference, DirectUrl};
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,6 @@ workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
colored = { workspace = true }
|
colored = { workspace = true }
|
||||||
fxhash = { workspace = true }
|
|
||||||
once_cell = { workspace = true }
|
once_cell = { workspace = true }
|
||||||
|
rustc-hash = { workspace = true }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
|
||||||
use fxhash::FxHashSet;
|
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
// macro hygiene: The user might not have direct dependencies on those crates
|
// macro hygiene: The user might not have direct dependencies on those crates
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,13 @@ colored = { workspace = true }
|
||||||
derivative = { workspace = true }
|
derivative = { workspace = true }
|
||||||
fs-err = { workspace = true, features = ["tokio"] }
|
fs-err = { workspace = true, features = ["tokio"] }
|
||||||
futures = { workspace = true }
|
futures = { workspace = true }
|
||||||
fxhash = { workspace = true }
|
|
||||||
http-cache-semantics = { workspace = true }
|
http-cache-semantics = { workspace = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
once_cell = { workspace = true }
|
once_cell = { workspace = true }
|
||||||
petgraph = { workspace = true }
|
petgraph = { workspace = true }
|
||||||
pubgrub = { workspace = true }
|
pubgrub = { workspace = true }
|
||||||
reqwest = { workspace = true }
|
reqwest = { workspace = true }
|
||||||
|
rustc-hash = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
sha2 = { workspace = true }
|
sha2 = { workspace = true }
|
||||||
tempfile = { workspace = true }
|
tempfile = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use fxhash::FxHashMap;
|
|
||||||
use pubgrub::range::Range;
|
use pubgrub::range::Range;
|
||||||
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use pep508_rs::{Requirement, VersionOrUrl};
|
use pep508_rs::{Requirement, VersionOrUrl};
|
||||||
use puffin_normalize::PackageName;
|
use puffin_normalize::PackageName;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use std::hash::BuildHasherDefault;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use fxhash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use distribution_types::Dist;
|
use distribution_types::Dist;
|
||||||
use pep440_rs::Version;
|
use pep440_rs::Version;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use fxhash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
use pep508_rs::{Requirement, VersionOrUrl};
|
use pep508_rs::{Requirement, VersionOrUrl};
|
||||||
use puffin_normalize::PackageName;
|
use puffin_normalize::PackageName;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use std::cmp::Reverse;
|
use std::cmp::Reverse;
|
||||||
|
|
||||||
use fxhash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use puffin_normalize::PackageName;
|
use puffin_normalize::PackageName;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@ use std::hash::BuildHasherDefault;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use colored::Colorize;
|
use colored::Colorize;
|
||||||
use fxhash::FxHashMap;
|
|
||||||
use petgraph::visit::EdgeRef;
|
use petgraph::visit::EdgeRef;
|
||||||
use petgraph::Direction;
|
use petgraph::Direction;
|
||||||
use pubgrub::range::Range;
|
use pubgrub::range::Range;
|
||||||
use pubgrub::solver::{Kind, State};
|
use pubgrub::solver::{Kind, State};
|
||||||
use pubgrub::type_aliases::SelectedDependencies;
|
use pubgrub::type_aliases::SelectedDependencies;
|
||||||
|
use rustc_hash::FxHashMap;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use distribution_types::{BuiltDist, Dist, Metadata, SourceDist};
|
use distribution_types::{BuiltDist, Dist, Metadata, SourceDist};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use fxhash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
use pep508_rs::Requirement;
|
use pep508_rs::Requirement;
|
||||||
use puffin_normalize::PackageName;
|
use puffin_normalize::PackageName;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ use anyhow::Result;
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use futures::channel::mpsc::UnboundedReceiver;
|
use futures::channel::mpsc::UnboundedReceiver;
|
||||||
use futures::{pin_mut, FutureExt, StreamExt, TryFutureExt};
|
use futures::{pin_mut, FutureExt, StreamExt, TryFutureExt};
|
||||||
use fxhash::{FxHashMap, FxHashSet};
|
use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
|
|
||||||
use pubgrub::error::PubGrubError;
|
use pubgrub::error::PubGrubError;
|
||||||
use pubgrub::range::Range;
|
use pubgrub::range::Range;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
use fxhash::{FxHashMap, FxHashSet};
|
use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
|
|
||||||
use pep440_rs::Version;
|
use pep440_rs::Version;
|
||||||
use pep508_rs::Requirement;
|
use pep508_rs::Requirement;
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,6 @@ puffin-cache = { path = "../puffin-cache" }
|
||||||
puffin-interpreter = { path = "../puffin-interpreter" }
|
puffin-interpreter = { path = "../puffin-interpreter" }
|
||||||
|
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
fxhash = { workspace = true }
|
rustc-hash = { workspace = true }
|
||||||
tokio = { workspace = true, features = ["sync"] }
|
tokio = { workspace = true, features = ["sync"] }
|
||||||
waitmap = { workspace = true }
|
waitmap = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use std::borrow::Borrow;
|
||||||
use std::collections::hash_map::RandomState;
|
use std::collections::hash_map::RandomState;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
|
|
||||||
use fxhash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
use waitmap::{Ref, WaitMap};
|
use waitmap::{Ref, WaitMap};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue