From a70ffecf9fd087c025c5840e3806a18215b5125f Mon Sep 17 00:00:00 2001 From: Abraham Egnor Date: Tue, 2 Sep 2025 10:27:48 +0100 Subject: [PATCH 1/2] RUST-2142 Pre-3.0 release tooling update --- Cargo.toml | 4 ++-- etc/update_version/src/main.rs | 26 ++++++++++++++++++++------ src/lib.rs | 2 +- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ebed68081..cf2079777 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -149,17 +149,17 @@ optional = true default-features = false [dependencies.bson2] +version = "2.15.0" git = "https://github.com/mongodb/bson-rust" branch = "2.15.x" package = "bson" -version = "2.15.0" optional = true [dependencies.bson3] +version = "3.0.0" git = "https://github.com/mongodb/bson-rust" branch = "main" package = "bson" -version = "3.0.0" optional = true features = ["serde"] diff --git a/etc/update_version/src/main.rs b/etc/update_version/src/main.rs index f1383bb04..fe45f2d13 100644 --- a/etc/update_version/src/main.rs +++ b/etc/update_version/src/main.rs @@ -64,9 +64,13 @@ struct Args { #[argh(option)] version: String, - /// version of the bson crate + /// version of the bson crate (2.x) #[argh(option)] - bson: Option, + bson2: Option, + + /// version of the bson crate (3.x) + #[argh(option)] + bson3: Option, /// version of the mongocrypt crate #[argh(option)] @@ -110,10 +114,20 @@ fn main() { pending.apply(loc, &args.version); } - if let Some(bson) = args.bson { - let bson_version_loc = - Location::new("Cargo.toml", r#"bson =.*version = "(?.*?)".*"#); - pending.apply(&bson_version_loc, &bson); + if let Some(bson2) = args.bson2 { + let bson_version_loc = Location::new( + "Cargo.toml", + r#"\[dependencies.bson2\]\nversion = "(?.*?)"\n"#, + ); + pending.apply(&bson_version_loc, &bson2); + } + + if let Some(bson3) = args.bson3 { + let bson_version_loc = Location::new( + "Cargo.toml", + r#"\[dependencies.bson3\]\nversion = "(?.*?)"\n"#, + ); + pending.apply(&bson_version_loc, &bson3); } if let Some(mongocrypt) = args.mongocrypt { diff --git a/src/lib.rs b/src/lib.rs index d41b2da1c..77c5f65cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,7 +21,7 @@ pub mod options; pub use ::mongocrypt; pub mod action; -pub mod atlas_search; +//pub mod atlas_search; pub(crate) mod bson_compat; mod bson_util; pub mod change_stream; From 9eb1213a4d2a88d9b12a439cd2209970db7cda70 Mon Sep 17 00:00:00 2001 From: Abraham Egnor Date: Tue, 2 Sep 2025 10:35:13 +0100 Subject: [PATCH 2/2] mongocrypt fix --- Cargo.toml | 2 +- etc/update_version/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cf2079777..3a17134db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -164,9 +164,9 @@ optional = true features = ["serde"] [dependencies.mongocrypt] +version = "0.3.1" git = "https://github.com/mongodb/libmongocrypt-rust.git" branch = "main" -version = "0.3.1" default-features = false optional = true diff --git a/etc/update_version/src/main.rs b/etc/update_version/src/main.rs index fe45f2d13..cda756a3b 100644 --- a/etc/update_version/src/main.rs +++ b/etc/update_version/src/main.rs @@ -133,7 +133,7 @@ fn main() { if let Some(mongocrypt) = args.mongocrypt { let mongocrypt_version_loc = Location::new( "Cargo.toml", - r#"mongocrypt =.*version = "(?.*?)".*"#, + r#"\[dependencies.mongocrypt\]\nversion = "(?.*?)".*"#, ); pending.apply(&mongocrypt_version_loc, &mongocrypt); }