-
Notifications
You must be signed in to change notification settings - Fork 179
RUST-2217 Optionally support bson crate 3.0 #1380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
0384a7e
fbd3f32
c54ca20
99cdede
c1e0af0
1fe64fb
4358d38
ecd77ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,10 @@ exclude = [ | |
|
||
[features] | ||
default = ["compat-3-0-0", "rustls-tls", "dns-resolver"] | ||
compat-3-0-0 = [] | ||
compat-3-0-0 = ["compat-3-3-0", "bson-2"] | ||
compat-3-3-0 = [] | ||
bson-2 = ["dep:bson2", "mongocrypt/bson-2"] | ||
bson-3 = ["dep:bson3", "mongocrypt/bson-3"] | ||
sync = [] | ||
rustls-tls = ["dep:rustls", "dep:tokio-rustls"] | ||
openssl-tls = ["dep:openssl", "dep:openssl-probe", "dep:tokio-openssl"] | ||
|
@@ -73,7 +76,6 @@ tracing-unstable = ["dep:tracing", "dep:log"] | |
async-trait = "0.1.42" | ||
base64 = "0.13.0" | ||
bitflags = "1.1.0" | ||
bson = { git = "https://github.com/mongodb/bson-rust", branch = "main", version = "2.14.0" } | ||
chrono = { version = "0.4.7", default-features = false, features = [ | ||
"clock", | ||
"std", | ||
|
@@ -92,7 +94,6 @@ hmac = "0.12.1" | |
once_cell = "1.19.0" | ||
log = { version = "0.4.17", optional = true } | ||
md-5 = "0.10.1" | ||
mongocrypt = { git = "https://github.com/mongodb/libmongocrypt-rust.git", branch = "main", optional = true, version = "0.2.1" } | ||
mongodb-internal-macros = { path = "macros", version = "3.2.3" } | ||
num_cpus = { version = "1.13.1", optional = true } | ||
openssl = { version = "0.10.38", optional = true } | ||
|
@@ -120,6 +121,27 @@ zstd = { version = "0.11.2", optional = true } | |
macro_magic = "0.5.1" | ||
rustversion = "1.0.20" | ||
|
||
[dependencies.bson2] | ||
git = "https://github.com/mongodb/bson-rust" | ||
branch = "2.15.x" | ||
package = "bson" | ||
version = "2.15.0" | ||
optional = true | ||
|
||
[dependencies.bson3] | ||
git = "https://github.com/mongodb/bson-rust" | ||
branch = "main" | ||
package = "bson" | ||
version = "3.0.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mostly out of curiosity: will this break if we try to release the driver before bson 3.0 is released? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
optional = true | ||
|
||
[dependencies.mongocrypt] | ||
git = "https://github.com/mongodb/libmongocrypt-rust.git" | ||
branch = "main" | ||
version = "0.3.0" | ||
default-features = false | ||
optional = true | ||
|
||
[dependencies.pbkdf2] | ||
version = "0.11.0" | ||
default-features = false | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use bson::{Bson, Document}; | ||
use crate::bson::{Bson, Document}; | ||
use std::time::Duration; | ||
|
||
use crate::{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use bson::{Bson, Document}; | ||
use crate::bson::{Bson, Document}; | ||
use std::time::Duration; | ||
|
||
use crate::{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
use std::time::Duration; | ||
|
||
use bson::Bson; | ||
use crate::bson::Bson; | ||
|
||
use crate::{ | ||
coll::options::DropIndexOptions, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use bson::{doc, Bson}; | ||
use crate::bson::{doc, Bson}; | ||
|
||
use crate::{ | ||
action::action_impl, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping a rolling
compat-VERSION
feature allows us to do this again for other things if we need to, e.g. if we need to go back to supporting multiple async runtimes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. That seems like a good precaution in case there is a future need to make a required feature optional.