Skip to content

Commit

Permalink
Update all Rust deps (#140)
Browse files Browse the repository at this point in the history
* Update dependencies

* Upgrade all dependencies to the latest versions
  • Loading branch information
kylewlacy authored Nov 20, 2024
1 parent 4767f23 commit 563bc1e
Show file tree
Hide file tree
Showing 16 changed files with 1,607 additions and 1,211 deletions.
2,614 changes: 1,498 additions & 1,116 deletions Cargo.lock

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions crates/brioche-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,77 @@ version = "0.1.3"
edition = "2021"

[dependencies]
anyhow = { version = "1.0.75", features = ["backtrace"] }
anyhow = { version = "1.0.93", features = ["backtrace"] }
assert_matches = "1.5.0"
async-compression = { version = "0.4.5", features = ["tokio", "bzip2", "gzip", "xz", "zstd"] }
async-recursion = "1.0.5"
async-compression = { version = "0.4.17", features = ["tokio", "bzip2", "gzip", "xz", "zstd"] }
async-recursion = "1.1.1"
biome_formatter = "0.5.7"
biome_js_formatter = "0.5.7"
biome_js_parser = "0.5.7"
biome_js_syntax = "0.5.7"
biome_rowan = "0.5.7"
blake3 = "1.5.0"
blake3 = "1.5.4"
brioche-pack = { path = "../brioche-pack" }
bstr = { version = "1.8.0", features = ["serde"] }
bstr = { version = "1.11.0", features = ["serde"] }
cfg-if = "1.0.0"
console-subscriber = "0.4.0"
console-subscriber = "0.4.1"
debug-ignore = "1.0.5"
deno_ast = { version = "0.41.1", features = ["transpiling"] }
deno_core = "0.303.0"
deno_ast = { version = "0.43.3", features = ["transpiling"] }
deno_core = "0.321.0"
directories = "5.0.1"
futures = "0.3.29"
globset = "0.4.14"
futures = "0.3.31"
globset = "0.4.15"
hex = "0.4.3"
joinery = "3.1.0"
json-canon = "0.1.3"
lazy_format = "2.0.3"
nix = { version = "0.29.0", features = ["user"] }
opentelemetry = "0.24.0"
opentelemetry_sdk = "0.24.0"
opentelemetry-otlp = {version = "0.17.0", default-features = false, features = ["http-proto", "reqwest-rustls"] }
opentelemetry-semantic-conventions = "0.16.0"
pathdiff = "0.2.1"
regex = "1.10.2"
relative-path = { version = "1.9.0", features = ["serde"] }
reqwest = { version = "0.12.4", default-features = false, features = ["rustls-tls", "zstd", "json", "stream"] }
reqwest-middleware = { version = "0.3.1", features = ["json"] }
reqwest-retry = "0.6.0"
rust-embed = { version = "8.1.0", features = ["debug-embed", "interpolate-folder-path", "include-exclude"] }
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
serde_v8 = "0.212.0"
serde_with = { version = "3.4.0", features = ["hex"] }
opentelemetry = "0.27.0"
opentelemetry_sdk = "0.27.0"
opentelemetry-otlp = {version = "0.27.0", default-features = false, features = ["http-proto", "reqwest-rustls"] }
opentelemetry-semantic-conventions = "0.27.0"
pathdiff = "0.2.2"
regex = "1.11.1"
relative-path = { version = "1.9.3", features = ["serde"] }
reqwest = { version = "0.12.9", default-features = false, features = ["rustls-tls", "zstd", "json", "stream"] }
reqwest-middleware = { version = "0.4.0", features = ["json"] }
reqwest-retry = "0.7.0"
rust-embed = { version = "8.5.0", features = ["debug-embed", "interpolate-folder-path", "include-exclude"] }
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"
serde_v8 = "0.230.0"
serde_with = { version = "3.11.0", features = ["hex"] }
sha2 = "0.10.8"
sqlx = { version = "0.7.3", features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate", "json"] }
sqlx = { version = "0.8.2", features = ["runtime-tokio-rustls", "sqlite", "macros", "migrate", "json"] }
strum = { version = "0.26.3", features = ["derive"] }
superconsole = "0.2.0"
thiserror = "1.0.51"
thiserror = "2.0.3"
tick-encoding = "0.1.2"
tokio = { version = "1.35.0", features = ["full", "tracing"] }
tokio-util = { version = "0.7.10", features = ["compat", "full"] }
toml = "0.8.8"
tokio = { version = "1.41.1", features = ["full", "tracing"] }
tokio-util = { version = "0.7.12", features = ["compat", "full"] }
toml = "0.8.19"
tower-lsp = "0.20.0"
tracing = "0.1.40"
tracing-opentelemetry = "0.25.0"
tracing-opentelemetry = "0.28.0"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json", "tracing-log"] }
ulid = "1.1.0"
url = { version = "2.5.0", features = ["serde"] }
ulid = "1.1.3"
url = { version = "2.5.3", features = ["serde"] }
urlencoding = "2.1.3"
walkdir = "2.5.0"
petgraph = "0.6.5"
wax = { version = "0.6.0", default-features = false }
gix = { version = "0.66.0", features = ["blocking-network-client", "blocking-http-transport-reqwest"] }
tar = "0.4.42"
gix = { version = "0.67.0", features = ["blocking-network-client", "blocking-http-transport-reqwest"] }
tar = "0.4.43"
num_enum = "0.7.3"
jiff = { version = "0.1.13", features = ["serde"] }
jiff = { version = "0.1.14", features = ["serde"] }
zstd-framed = { version = "0.1.1", features = ["tokio"] }

[dev-dependencies]
brioche-test-support = { path = "../brioche-test-support" }
divan = "0.1.14"
mockito = "1.2.0"
pretty_assertions = "1.4.0"
zstd = "0.13.1"
divan = "0.1.15"
mockito = "1.6.1"
pretty_assertions = "1.4.1"
zstd = "0.13.2"

[target.'cfg(target_os = "linux")'.dependencies]
libmount = "0.1.15"
Expand Down
1 change: 1 addition & 0 deletions crates/brioche-core/src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub async fn create_output(
Ok(())
}

#[allow(clippy::multiple_bound_locations)]
#[async_recursion::async_recursion]
#[tracing::instrument(skip(brioche, artifact, link_lock), fields(artifact_hash = %artifact.hash()), err)]
async fn create_output_inner<'a: 'async_recursion>(
Expand Down
12 changes: 9 additions & 3 deletions crates/brioche-core/src/recipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ pub async fn get_recipes(
let mut arguments = sqlx::sqlite::SqliteArguments::default();

for recipe_hash in uncached_recipe_batch {
arguments.add(recipe_hash.to_string());
arguments
.add(recipe_hash.to_string())
.map_err(|error| anyhow::anyhow!(error))?;
}

let placeholders = std::iter::repeat("?")
Expand Down Expand Up @@ -300,8 +302,12 @@ where
let mut arguments = sqlx::sqlite::SqliteArguments::default();

for recipe in recipe_batch {
arguments.add(recipe.hash().to_string());
arguments.add(serde_json::to_string(recipe)?);
arguments
.add(recipe.hash().to_string())
.map_err(|error| anyhow::anyhow!(error))?;
arguments
.add(serde_json::to_string(recipe)?)
.map_err(|error| anyhow::anyhow!(error))?;
}

let placeholders = std::iter::repeat("(?, ?)")
Expand Down
4 changes: 3 additions & 1 deletion crates/brioche-core/src/references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ pub async fn local_recipes(
for recipe_batch in recipes.chunks(900) {
let mut arguments = sqlx::sqlite::SqliteArguments::default();
for recipe_hash in recipe_batch {
arguments.add(recipe_hash.to_string());
arguments
.add(recipe_hash.to_string())
.map_err(|error| anyhow::anyhow!(error))?;
}

let placeholders = std::iter::repeat("?")
Expand Down
18 changes: 9 additions & 9 deletions crates/brioche-core/src/reporter/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::{
use bstr::ByteSlice;
use joinery::JoinableIterator as _;
use opentelemetry::trace::TracerProvider as _;
use opentelemetry_otlp::WithHttpConfig;
use superconsole::style::Stylize;
use tracing_subscriber::{layer::SubscriberExt as _, util::SubscriberInitExt as _, Layer as _};

Expand Down Expand Up @@ -134,14 +135,13 @@ pub fn start_console_reporter(
opentelemetry::global::set_text_map_propagator(
opentelemetry_sdk::propagation::TraceContextPropagator::new(),
);
let provider = opentelemetry_otlp::new_pipeline()
.tracing()
.with_exporter(
opentelemetry_otlp::new_exporter()
.http()
.with_http_client(reqwest::Client::new()),
)
.with_trace_config(opentelemetry_sdk::trace::Config::default().with_resource(
let exporter = opentelemetry_otlp::SpanExporter::builder()
.with_http()
.with_http_client(reqwest::Client::new())
.build()?;
let provider = opentelemetry_sdk::trace::TracerProvider::builder()
.with_simple_exporter(exporter)
.with_config(opentelemetry_sdk::trace::Config::default().with_resource(
opentelemetry_sdk::Resource::default().merge(&opentelemetry_sdk::Resource::new(
vec![
opentelemetry::KeyValue::new(
Expand All @@ -155,7 +155,7 @@ pub fn start_console_reporter(
],
)),
))
.install_simple()?;
.build();

Some(
tracing_opentelemetry::layer()
Expand Down
9 changes: 5 additions & 4 deletions crates/brioche-core/src/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ impl BriocheModuleLoader {
imports_not_used_as_values: deno_ast::ImportsNotUsedAsValues::Preserve,
..Default::default()
},
&deno_ast::TranspileModuleOptions {
module_kind: Some(deno_ast::ModuleKind::Esm),
},
&deno_ast::EmitOptions {
source_map: deno_ast::SourceMapOption::Separate,
..Default::default()
Expand All @@ -85,15 +88,13 @@ impl BriocheModuleLoader {
.context("source map not generated")?;
entry.insert(ModuleSource {
source_contents: contents.clone(),
source_map,
source_map: source_map.into_bytes(),
});
}

Ok(deno_core::ModuleSource::new(
deno_core::ModuleType::JavaScript,
deno_core::ModuleSourceCode::Bytes(
transpiled.into_source().source.into_boxed_slice().into(),
),
deno_core::ModuleSourceCode::String(transpiled.into_source().text.into()),
module_specifier,
None,
))
Expand Down
4 changes: 2 additions & 2 deletions crates/brioche-core/tests/bake_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use brioche_test_support::bake_without_meta;
async fn test_bake_cache_nested() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -49,7 +49,7 @@ async fn test_bake_cache_nested() -> anyhow::Result<()> {
async fn test_bake_cache_unnested() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down
14 changes: 7 additions & 7 deletions crates/brioche-core/tests/bake_download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use brioche_test_support::bake_without_meta;
async fn test_bake_download() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -37,7 +37,7 @@ async fn test_bake_download() -> anyhow::Result<()> {
async fn test_bake_download_cached() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -73,7 +73,7 @@ async fn test_bake_download_cached() -> anyhow::Result<()> {
async fn test_bake_download_rerun_after_failure() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -109,7 +109,7 @@ async fn test_bake_download_rerun_after_failure() -> anyhow::Result<()> {
async fn test_bake_download_different_urls_with_same_hash() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -148,7 +148,7 @@ async fn test_bake_download_different_urls_with_same_hash() -> anyhow::Result<()
async fn test_bake_download_url_changed_hash() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -194,7 +194,7 @@ async fn test_bake_download_url_changed_hash() -> anyhow::Result<()> {
async fn test_bake_download_invalid_hash() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -229,7 +229,7 @@ async fn test_bake_download_invalid_hash() -> anyhow::Result<()> {
async fn test_bake_download_does_not_cache_using_only_hash() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down
2 changes: 1 addition & 1 deletion crates/brioche-core/tests/bake_parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use brioche_test_support::bake_without_meta;
async fn test_bake_parallel_no_duplicates() -> anyhow::Result<()> {
let (brioche, _context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down
4 changes: 2 additions & 2 deletions crates/brioche-core/tests/bake_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ async fn test_bake_process_networking_disabled(
brioche: &brioche_core::Brioche,
_context: &brioche_test_support::TestContext,
) -> anyhow::Result<()> {
let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let hello_endpoint = server
.mock("GET", "/file.txt")
.with_body("hello")
Expand Down Expand Up @@ -1494,7 +1494,7 @@ async fn test_bake_process_networking_enabled(
brioche: &brioche_core::Brioche,
_context: &brioche_test_support::TestContext,
) -> anyhow::Result<()> {
let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let hello_endpoint = server
.mock("GET", "/file.txt")
.with_body("hello")
Expand Down
4 changes: 2 additions & 2 deletions crates/brioche-core/tests/project_load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ async fn test_project_load_with_remote_registry_dep_with_brioche_glob() -> anyho
async fn test_project_load_with_remote_registry_dep_with_brioche_download() -> anyhow::Result<()> {
let (brioche, mut context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -1097,7 +1097,7 @@ async fn test_project_load_complex_implied() -> anyhow::Result<()> {
tokio::fs::write(
path.join("project.bri"),
r#"
// Empty projcet
// Empty project
"#,
)
.await
Expand Down
8 changes: 6 additions & 2 deletions crates/brioche-core/tests/script_eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ async fn test_eval_brioche_glob_submodule() -> anyhow::Result<()> {
async fn test_eval_brioche_download() -> anyhow::Result<()> {
let (brioche, context) = brioche_test_support::brioche_test().await;

let mut server = mockito::Server::new();
let mut server = mockito::Server::new_async().await;
let server_url = server.url();

let hello = "hello";
Expand Down Expand Up @@ -645,7 +645,11 @@ async fn test_eval_brioche_download() -> anyhow::Result<()> {
async fn test_eval_brioche_git_ref() -> anyhow::Result<()> {
let (brioche, context) = brioche_test_support::brioche_test().await;

let mut mock_repo = mockito::Server::new_with_port(1231);
let mut mock_repo = mockito::Server::new_with_opts_async(mockito::ServerOpts {
port: 1231,
..Default::default()
})
.await;
let mock_repo_url = mock_repo.url();

// Mock a git "handshake" server response for protocol version 2
Expand Down
8 changes: 4 additions & 4 deletions crates/brioche-pack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ edition = "2021"

[dependencies]
bincode = { version = "2.0.0-rc.3" }
bstr = { version = "1.8.0", features = ["serde"] }
serde = { version = "1.0.193", features = ["derive"] }
serde_with = { version = "3.4.0" }
thiserror = "1.0.51"
bstr = { version = "1.11.0", features = ["serde"] }
serde = { version = "1.0.215", features = ["derive"] }
serde_with = { version = "3.11.0" }
thiserror = "2.0.3"
tick-encoding = "0.1.2"
Loading

0 comments on commit 563bc1e

Please sign in to comment.