From b076635d9f6e10f014fc7a747e092cb1a59d4df1 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Wed, 19 Nov 2025 10:43:43 -0700 Subject: [PATCH 1/2] update versions --- Cargo.lock | 60 ++++++++++++++++++++++++++++++---- Cargo.toml | 4 +-- README.md | 4 +-- driver/Cargo.toml | 6 ++-- driver/src/lib.rs | 2 +- etc/update_version/src/main.rs | 28 +++++++++------- macros/Cargo.toml | 2 +- 7 files changed, 78 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46c5c8bf8..ba7dfce32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,6 +118,38 @@ dependencies = [ "num-traits", ] +[[package]] +name = "argh" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ff18325c8a36b82f992e533ece1ec9f9a9db446bd1c14d4f936bac88fcd240" +dependencies = [ + "argh_derive", + "argh_shared", + "rust-fuzzy-search", +] + +[[package]] +name = "argh_derive" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b2b83a50d329d5d8ccc620f5c7064028828538bdf5646acd60dc1f767803" +dependencies = [ + "argh_shared", + "proc-macro2", + "quote", + "syn 2.0.110", +] + +[[package]] +name = "argh_shared" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a464143cc82dedcdc3928737445362466b7674b5db4e2eb8e869846d6d84f4f6" +dependencies = [ + "serde", +] + [[package]] name = "array-init" version = "0.0.4" @@ -610,7 +642,7 @@ dependencies = [ [[package]] name = "bson" version = "3.0.0" -source = "git+https://github.com/mongodb/bson-rust?branch=main#6dca3c7ef1f5a8fb8b553f1e61474d2122f6d413" +source = "git+https://github.com/mongodb/bson-rust?branch=main#516f78066dcfdc474ed61ab11eb15b946efffdad" dependencies = [ "ahash", "base64", @@ -2056,8 +2088,8 @@ dependencies = [ [[package]] name = "mongocrypt" -version = "0.3.1" -source = "git+https://github.com/mongodb/libmongocrypt-rust.git?branch=main#5b5b49a23469ee26bb901221ebb32a22f491cfb9" +version = "0.3.2" +source = "git+https://github.com/mongodb/libmongocrypt-rust.git?branch=main#6fc0084825b4eb98229d13d621cab42b03498653" dependencies = [ "bson 2.15.0", "bson 3.0.0", @@ -2068,12 +2100,12 @@ dependencies = [ [[package]] name = "mongocrypt-sys" -version = "0.1.4+1.12.0" -source = "git+https://github.com/mongodb/libmongocrypt-rust.git?branch=main#5b5b49a23469ee26bb901221ebb32a22f491cfb9" +version = "0.1.5+1.15.1" +source = "git+https://github.com/mongodb/libmongocrypt-rust.git?branch=main#6fc0084825b4eb98229d13d621cab42b03498653" [[package]] name = "mongodb" -version = "3.3.0" +version = "3.4.0" dependencies = [ "anyhow", "approx", @@ -2154,7 +2186,7 @@ dependencies = [ [[package]] name = "mongodb-internal-macros" -version = "3.3.0" +version = "3.4.0" dependencies = [ "macro_magic", "proc-macro2", @@ -2808,6 +2840,12 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "rust-fuzzy-search" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a157657054ffe556d8858504af8a672a054a6e0bd9e8ee531059100c0fa11bb2" + [[package]] name = "rustc-demangle" version = "0.1.26" @@ -3700,6 +3738,14 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" +[[package]] +name = "update_version" +version = "0.1.0" +dependencies = [ + "argh", + "regex", +] + [[package]] name = "url" version = "2.5.7" diff --git a/Cargo.toml b/Cargo.toml index de38bd180..afea86387 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["driver", "macros", "benchmarks"] +members = ["driver", "macros", "benchmarks", "etc/update_version"] [workspace.package] authors = [ @@ -14,4 +14,4 @@ authors = [ license = "Apache-2.0" edition = "2021" repository = "https://github.com/mongodb/mongo-rust-driver" -rust-version = "1.83" \ No newline at end of file +rust-version = "1.83" diff --git a/README.md b/README.md index af9f9e524..ec294a701 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The driver is available on [crates.io](https://crates.io/crates/mongodb). To use ```toml [dependencies] -mongodb = "3.3.0" +mongodb = "3.4.0" ``` Version 1 of this crate has reached end of life and will no longer be receiving any updates or bug fixes, so all users are recommended to always depend on the latest 2.x release. See the [2.0.0 release notes](https://github.com/mongodb/mongo-rust-driver/releases/tag/v2.0.0) for migration information if upgrading from a 1.x version. @@ -34,7 +34,7 @@ The driver also provides a blocking sync API. To enable this, add the `"sync"` f ```toml [dependencies.mongodb] -version = "3.3.0" +version = "3.4.0" features = ["sync"] ``` diff --git a/driver/Cargo.toml b/driver/Cargo.toml index bbc1ae70b..c2f1c90c6 100644 --- a/driver/Cargo.toml +++ b/driver/Cargo.toml @@ -5,7 +5,7 @@ categories = ["asynchronous", "database", "web-programming"] homepage = "https://www.mongodb.com/docs/drivers/rust/" readme = "../README.md" name = "mongodb" -version = "3.3.0" +version = "3.4.0" authors.workspace = true license.workspace = true @@ -97,7 +97,7 @@ hickory-resolver = { version = "0.25", optional = true } hmac = "0.12.1" log = { version = "0.4.17", optional = true } md-5 = "0.10.1" -mongodb-internal-macros = { path = "../macros", version = "3.3.0" } +mongodb-internal-macros = { path = "../macros", version = "3.4.0" } num_cpus = { version = "1.13.1", optional = true } openssl = { version = "0.10.38", optional = true } openssl-probe = { version = "0.1.5", optional = true } @@ -164,7 +164,7 @@ optional = true features = ["serde"] [dependencies.mongocrypt] -version = "0.3.1" +version = "0.3.2" git = "https://github.com/mongodb/libmongocrypt-rust.git" branch = "main" default-features = false diff --git a/driver/src/lib.rs b/driver/src/lib.rs index 3641682ab..d8aed805c 100644 --- a/driver/src/lib.rs +++ b/driver/src/lib.rs @@ -15,7 +15,7 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] #![cfg_attr(test, type_length_limit = "80000000")] -#![doc(html_root_url = "https://docs.rs/mongodb/3.3.0")] +#![doc(html_root_url = "https://docs.rs/mongodb/3.4.0")] #[macro_use] pub mod options; diff --git a/etc/update_version/src/main.rs b/etc/update_version/src/main.rs index cda756a3b..dd24d395a 100644 --- a/etc/update_version/src/main.rs +++ b/etc/update_version/src/main.rs @@ -29,10 +29,14 @@ impl PendingUpdates { } fn apply(&mut self, location: &Location, update: &str) { - let text = self - .files - .entry(location.path) - .or_insert_with(|| std::fs::read_to_string(location.path).unwrap()); + let text = self.files.entry(location.path).or_insert_with(|| { + std::fs::read_to_string(location.path).expect( + std::path::absolute(location.path) + .unwrap() + .to_str() + .unwrap(), + ) + }); if !location.pattern.is_match(text) { panic!("no match for {:?}", location); @@ -81,19 +85,19 @@ fn main() { // nosemgrep: current-exe let zero = std::env::current_exe().unwrap(); let self_dir = zero.parent().unwrap(); - let main_dir = self_dir.join("../../../.."); + let main_dir = self_dir.join("..").join(".."); std::env::set_current_dir(main_dir).unwrap(); let args: Args = argh::from_env(); let version_locs = vec![ Location::new( - "Cargo.toml", + "driver/Cargo.toml", r#"name = "mongodb"\nversion = "(?.*?)"\n"#, ), Location::new( - "Cargo.toml", - r#"mongodb-internal-macros = \{ path = "macros", version = "(?.*?)" \}\n"#, + "driver/Cargo.toml", + r#"mongodb-internal-macros = \{ path = "../macros", version = "(?.*?)" \}\n"#, ), Location::new( "macros/Cargo.toml", @@ -105,7 +109,7 @@ fn main() { r#"\[dependencies.mongodb\]\nversion = "(?.*?)"\n"#, ), Location::new( - "src/lib.rs", + "driver/src/lib.rs", r#"html_root_url = "https://docs.rs/mongodb/(?.*?)""#, ), ]; @@ -116,7 +120,7 @@ fn main() { if let Some(bson2) = args.bson2 { let bson_version_loc = Location::new( - "Cargo.toml", + "driver/Cargo.toml", r#"\[dependencies.bson2\]\nversion = "(?.*?)"\n"#, ); pending.apply(&bson_version_loc, &bson2); @@ -124,7 +128,7 @@ fn main() { if let Some(bson3) = args.bson3 { let bson_version_loc = Location::new( - "Cargo.toml", + "driver/Cargo.toml", r#"\[dependencies.bson3\]\nversion = "(?.*?)"\n"#, ); pending.apply(&bson_version_loc, &bson3); @@ -132,7 +136,7 @@ fn main() { if let Some(mongocrypt) = args.mongocrypt { let mongocrypt_version_loc = Location::new( - "Cargo.toml", + "driver/Cargo.toml", r#"\[dependencies.mongocrypt\]\nversion = "(?.*?)".*"#, ); pending.apply(&mongocrypt_version_loc, &mongocrypt); diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 2b8810aa0..68c18bed5 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mongodb-internal-macros" -version = "3.3.0" +version = "3.4.0" description = "Internal macros for the mongodb crate" authors.workspace = true From 1244421be402ae8d1eeb5b40d5792d584e3309d2 Mon Sep 17 00:00:00 2001 From: Isabel Atkinson Date: Wed, 19 Nov 2025 11:14:01 -0700 Subject: [PATCH 2/2] fix deny --- etc/update_version/Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etc/update_version/Cargo.toml b/etc/update_version/Cargo.toml index 073e59af4..e41ec5732 100644 --- a/etc/update_version/Cargo.toml +++ b/etc/update_version/Cargo.toml @@ -1,7 +1,12 @@ [package] name = "update_version" version = "0.1.0" -edition = "2021" + +authors.workspace = true +license.workspace = true +edition.workspace = true +repository.workspace = true +rust-version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html