-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
We're currently in a difficult position regarding our feature flags. Our recommendation for users who want to use our sync API has been to disable default features and add features = [sync] to their Cargo.toml. The sync feature enables the async-std-runtime feature, because we originally only supported sync with async-std. However, this presented a problem when adding support for using the tokio runtime with the sync API in RUST-995. Ideally we'd remove the enabling of async-std from the sync feature and allow users to specify a runtime themselves, but doing so would mean breaking any code that enables sync as described above, as no async runtime would be enabled. Because of this we needed to introduce a separate tokio-sync feature, which adds unnecessary verbosity to our set of features. When we do a 3.0 release we should clean up our features by removing tokio-sync and updating sync not to pull in any runtimes.
In addition to cleaning up these issues, we should also audit our dependencies to see if there's anything we should move behind feature flags to avoid future situations like these.
Update: this work should also entail removing the bson-related feature flags from the driver and documenting that users should add bson as a direct dependency instead. (https://github.com/mongodb/mongo-rust-driver/issues/909)
- is related to
-
RUST-1680 Make trust-dns-resolver optional
- Closed