Skip to content

Commit

Permalink
chore: update all versions of packages (#886)
Browse files Browse the repository at this point in the history
Just a periodic update of everything. Going to test the incompatible
updates as well.
  • Loading branch information
wolfv authored Nov 1, 2024
1 parent 27d5d32 commit 7617946
Show file tree
Hide file tree
Showing 9 changed files with 102 additions and 91 deletions.
136 changes: 69 additions & 67 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@ tag-prefix = ""
lto = true

[workspace.dependencies]
anyhow = "1.0.82"
anyhow = "1.0.92"
archspec = "0.1.3"
assert_matches = "1.5.0"
async-compression = { version = "0.4.8", features = [
async-compression = { version = "0.4.17", features = [
"gzip",
"tokio",
"bzip2",
"zstd",
] }
async-fd-lock = "0.2.0"
fs4 = "0.9.1"
async-trait = "0.1.80"
axum = { version = "0.7.5", default-features = false, features = [
fs4 = "0.10.0"
async-trait = "0.1.83"
axum = { version = "0.7.7", default-features = false, features = [
"tokio",
"http1",
] }
base64 = "0.22.0"
bindgen = "0.69.4"
base64 = "0.22.1"
bindgen = "0.69.5"
blake2 = "0.10.6"
bytes = "1.6.0"
bytes = "1.8.0"
bzip2 = "0.4.4"
cache_control = "0.2.0"
cfg-if = "1.0"
Expand All @@ -51,80 +51,82 @@ chrono = { version = "0.4.38", default-features = false, features = [
"serde",
"alloc",
] }
clap = { version = "4.5.4", features = ["derive"] }
cmake = "0.1.50"
clap = { version = "4.5.20", features = ["derive"] }
cmake = "0.1.51"
console = { version = "0.15.8", features = ["windows-console-colors"] }
criterion = "0.5"
dashmap = "6.0.1"
dashmap = "6.1.0"
difference = "2.0.0"
digest = "0.10.7"
dirs = "5.0.1"
dunce = "1.0.4"
dunce = "1.0.5"
enum_dispatch = "0.3.13"
fs-err = { version = "2.11.0", features = ["tokio"] }
fs-err = { version = "3.0.0", features = ["tokio"] }
fslock = "0.2.1"
futures = "0.3.30"
futures-util = "0.3.30"
futures = "0.3.31"
futures-util = "0.3.31"
fxhash = "0.2.1"
generic-array = "0.14.4"
getrandom = { version = "0.2.14", default-features = false }
# lots of other crates are still stuck on older version
generic-array = "0.14.7"
getrandom = { version = "0.2.15", default-features = false }
glob = "0.3.1"
google-cloud-auth = { version = "0.13.2", default-features = false }
google-cloud-auth = { version = "0.17.1", default-features = false }
google-cloud-token = "0.1.2"
hex = "0.4.3"
hex-literal = "0.4.1"
http = "1.1"
http-cache-semantics = "2.1.0"
humansize = "2.1.3"
humantime = "2.1.0"
indexmap = "2.2.6"
indexmap = "2.6.0"
indicatif = "0.17.8"
insta = { version = "1.38.0" }
insta = { version = "1.41.1" }
itertools = "0.13.0"
json-patch = "2.0.0"
keyring = "3.1.0"
lazy-regex = "3.1.0"
lazy_static = "1.4.0"
json-patch = "3.0.1"
keyring = "3.6.1"
lazy-regex = "3.3.0"
lazy_static = "1.5.0"
libc = { version = "0.2" }
libloading = "0.8.3"
libz-sys = { version = "1.1.16", default-features = false }
libloading = "0.8.5"
libz-sys = { version = "1.1.20", default-features = false }
md-5 = "0.10.6"
memchr = "2.7.2"
memmap2 = "0.9.4"
memchr = "2.7.4"
memmap2 = "0.9.5"
netrc-rs = "0.1.2"
nom = "7.1.3"
num_cpus = "1.16.0"
once_cell = "1.19.0"
ouroboros = "0.18.3"
parking_lot = "0.12.1"
pathdiff = "0.2.1"
pep440_rs = { version = "0.6.0" }
pep508_rs = { version = "0.6.0" }
once_cell = "1.20.2"
ouroboros = "0.18.4"
parking_lot = "0.12.3"
pathdiff = "0.2.2"
pep440_rs = { version = "0.6.6" }
pep508_rs = { version = "0.6.1" }
percent-encoding = "2.3.1"
pin-project-lite = "0.2.14"
pin-project-lite = "0.2.15"
plist = "1"
purl = { version = "0.1.2", features = ["serde"] }
quote = "1.0.36"
purl = { version = "0.1.3", features = ["serde"] }
quote = "1.0.37"
rand = "0.8.5"
reflink-copy = "0.1.16"
regex = "1.10.4"
reqwest = { version = "0.12.3", default-features = false }
reqwest-middleware = "0.3.0"
reqwest-retry = "0.6.0"
reflink-copy = "0.1.19"
regex = "1.11.1"
reqwest = { version = "0.12.9", default-features = false }
reqwest-middleware = "0.3.3"
reqwest-retry = "0.6.1"
resolvo = { version = "0.8.2" }
retry-policies = { version = "0.4.0", default-features = false }
rmp-serde = { version = "1.2.0" }
rstest = { version = "0.21.0" }
rmp-serde = { version = "1.3.0" }
rstest = { version = "0.23.0" }
rstest_reuse = "0.7.0"
simd-json = { version = "0.14.0", features = ["serde_impl"] }
serde = { version = "1.0.198" }
serde_json = { version = "1.0.116" }
simd-json = { version = "0.14.2", features = ["serde_impl"] }
serde = { version = "1.0.214" }
serde_json = { version = "1.0.132" }
serde_repr = "0.1"
serde_with = "3.7.0"
serde_with = "3.11.0"
serde_yaml = "0.9.34"
serde-untagged = "0.1.6"
sha2 = "0.10.8"
shlex = "1.3.0"
similar-asserts = "1.5.0"
similar-asserts = "1.6.0"
smallvec = { version = "1.13.2", features = [
"serde",
"const_new",
Expand All @@ -133,27 +135,27 @@ smallvec = { version = "1.13.2", features = [
] }
strum = { version = "0.26.3", features = ["derive"] }
superslice = "1.0.0"
syn = "2.0.59"
sysinfo = "0.30.10"
tar = "0.4.40"
syn = "2.0.86"
sysinfo = "0.32.0"
tar = "0.4.42"
tempdir = "0.3.7"
tempfile = "3.10.1"
tempfile = "3.13.0"
temp-env = "0.3.6"
test-log = "0.2.15"
test-log = "0.2.16"
thiserror = "1.0"
tokio = { version = "1.37.0", default-features = false }
tokio-stream = "0.1.15"
tokio-util = "0.7.10"
tower = { version = "0.4.13", default-features = false }
tower-http = { version = "0.5.2", default-features = false }
tokio = { version = "1.41.0", default-features = false }
tokio-stream = "0.1.16"
tokio-util = "0.7.12"
tower = { version = "0.5.1", default-features = false }
tower-http = { version = "0.6.1", default-features = false }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", default-features = false }
tracing-test = { version = "0.2.4" }
trybuild = { version = "1.0.91" }
typed-path = { version = "0.9.2" }
url = { version = "2.5.0" }
uuid = { version = "1.8.0", default-features = false }
tracing-test = { version = "0.2.5" }
trybuild = { version = "1.0.101" }
typed-path = { version = "0.9.3" }
url = { version = "2.5.2" }
uuid = { version = "1.11.0", default-features = false }
walkdir = "2.5.0"
windows-sys = { version = "0.52.0", default-features = false }
zip = { version = "2.1.3", default-features = false }
zstd = { version = "0.13.1", default-features = false }
windows-sys = { version = "0.59.0", default-features = false }
zip = { version = "2.2.0", default-features = false }
zstd = { version = "0.13.2", default-features = false }
2 changes: 1 addition & 1 deletion crates/file_url/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ url = { workspace = true }
percent-encoding = { workspace = true }
itertools = { workspace = true }
typed-path = { workspace = true }
thiserror = "1.0.61"
thiserror = "1.0.66"

[dev-dependencies]
rstest = { workspace = true }
2 changes: 1 addition & 1 deletion crates/rattler-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ indicatif = { workspace = true }
once_cell = { workspace = true }
rattler = { path="../rattler", version = "0.27.16", default-features = false, features = ["indicatif"] }
rattler_conda_types = { path="../rattler_conda_types", version = "0.28.3", default-features = false }
rattler_networking = { path="../rattler_networking", version = "0.21.4", default-features = false, features = ["google-cloud-auth"] }
rattler_networking = { path="../rattler_networking", version = "0.21.4", default-features = false, features = ["gcs"] }
rattler_repodata_gateway = { path="../rattler_repodata_gateway", version = "0.21.18", default-features = false, features = ["gateway"] }
rattler_solve = { path="../rattler_solve", version = "1.1.0", default-features = false, features = ["resolvo", "libsolv_c"] }
rattler_virtual_packages = { path="../rattler_virtual_packages", version = "1.1.7", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_libsolv_c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ libz-sys = { workspace = true, features = ["static"] }
anyhow = { workspace = true }
# 1.0.84 would fail to compile this library specifically on macOS.
# For now we just pin an older version.
cc = "1.0.106"
cc = "1.1.31"
cmake = { workspace = true }

[package.metadata.cargo-udeps.ignore]
Expand Down
6 changes: 4 additions & 2 deletions crates/rattler_networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ readme.workspace = true

[features]
default = ["native-tls"]
native-tls = ['reqwest/native-tls', "google-cloud-auth?/default-tls"]
rustls-tls = ['reqwest/rustls-tls', "google-cloud-auth?/rustls-tls"]
native-tls = ["reqwest/native-tls", "google-cloud-auth?/default-tls"]
rustls-tls = ["reqwest/rustls-tls", "google-cloud-auth?/rustls-tls"]
gcs = ["google-cloud-auth", "google-cloud-token"]

[dependencies]
anyhow = { workspace = true }
Expand All @@ -23,6 +24,7 @@ chrono = { workspace = true }
dirs = { workspace = true }
fslock = { workspace = true }
google-cloud-auth = { workspace = true, optional = true }
google-cloud-token = { workspace = true, optional = true }
http = { workspace = true }
itertools = { workspace = true }
keyring = { workspace = true, features = ["apple-native", "windows-native", "async-secret-service", "async-io", "crypto-rust"] }
Expand Down
24 changes: 13 additions & 11 deletions crates/rattler_networking/src/gcs_middleware.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Middleware to handle `gcs://` URLs to pull artifacts from an GCS
use async_trait::async_trait;
use google_cloud_auth::project::{create_token_source, Config};
use google_cloud_auth::{project::Config, token::DefaultTokenSourceProvider};
use google_cloud_token::TokenSourceProvider;
use reqwest::{Request, Response};
use reqwest_middleware::{Middleware, Next, Result as MiddlewareResult};
use url::Url;
Expand Down Expand Up @@ -40,23 +41,24 @@ async fn authenticate_with_google_cloud(mut req: Request) -> MiddlewareResult<Re
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/devstorage.read_only",
];
match create_token_source(Config {
audience: Some(audience),
scopes: Some(&scopes),
sub: None,
})
.await
{
Ok(ts) => match ts.token().await {
let config = Config::default()
.with_audience(audience)
.with_scopes(&scopes);

match DefaultTokenSourceProvider::new(config).await {
Ok(provider) => match provider.token_source().token().await {
Ok(token) => {
let bearer_auth = format!("Bearer {}", token.access_token);
let bearer_auth = format!("Bearer {}", token);
let header_value = reqwest::header::HeaderValue::from_str(&bearer_auth)
.map_err(reqwest_middleware::Error::middleware)?;
req.headers_mut()
.insert(reqwest::header::AUTHORIZATION, header_value);
Ok(req)
}
Err(e) => Err(reqwest_middleware::Error::Middleware(anyhow::Error::new(e))),
Err(e) => Err(reqwest_middleware::Error::Middleware(anyhow::anyhow!(
"Failed to get GCS token: {:?}",
e
))),
},
Err(e) => Err(reqwest_middleware::Error::Middleware(anyhow::Error::new(e))),
}
Expand Down
4 changes: 2 additions & 2 deletions crates/rattler_networking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ pub use authentication_storage::{authentication::Authentication, storage::Authen
pub use mirror_middleware::MirrorMiddleware;
pub use oci_middleware::OciMiddleware;

#[cfg(feature = "google-cloud-auth")]
#[cfg(feature = "gcs")]
pub mod gcs_middleware;
#[cfg(feature = "google-cloud-auth")]
#[cfg(feature = "gcs")]
pub use gcs_middleware::GCSMiddleware;

pub mod authentication_middleware;
Expand Down
2 changes: 1 addition & 1 deletion crates/rattler_shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ itertools = { workspace = true }
rattler_conda_types = { path="../rattler_conda_types", version = "0.28.3", default-features = false }
serde_json = { workspace = true, features = ["preserve_order"] }
shlex = { workspace = true }
sysinfo = { workspace = true, optional = true }
sysinfo = { workspace = true , optional = true }
tempfile = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
Expand Down
15 changes: 10 additions & 5 deletions crates/rattler_shell/src/shell/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,16 +662,21 @@ impl ShellEnum {

// Get current process information
let mut current_pid = get_current_pid().ok()?;
system_info.refresh_process(current_pid);
system_info.refresh_processes(sysinfo::ProcessesToUpdate::Some(&[current_pid]), true);

while let Some(parent_process_id) = system_info
.process(current_pid)
.and_then(sysinfo::Process::parent)
{
// Get the name of the parent process
system_info.refresh_process(parent_process_id);
system_info
.refresh_processes(sysinfo::ProcessesToUpdate::Some(&[parent_process_id]), true);
let parent_process = system_info.process(parent_process_id)?;
let parent_process_name = parent_process.name().to_lowercase();
let parent_process_name = parent_process
.name()
.to_string_lossy()
.to_lowercase()
.to_string();

let shell: Option<ShellEnum> = if parent_process_name.contains("bash") {
Some(Bash.into())
Expand All @@ -683,7 +688,7 @@ impl ShellEnum {
|| (parent_process_name.contains("python")
&& parent_process
.cmd().iter()
.any(|arg| arg.contains("xonsh")))
.any(|arg| arg.to_string_lossy().contains("xonsh")))
{
Some(Xonsh.into())
} else if parent_process_name.contains("fish") {
Expand All @@ -695,7 +700,7 @@ impl ShellEnum {
{
Some(
PowerShell {
executable_path: parent_process_name.clone(),
executable_path: parent_process_name.to_string(),
}
.into(),
)
Expand Down

0 comments on commit 7617946

Please sign in to comment.