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