-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new feature flag
default-engine-rustls
(#572)
We had a request to remove our (implicit) dependency on native-tls. The `default-engine` feature flag pulls in `reqwest` with default features which requires native-tls. This PR introduces a new feature flag: `default-engine-rustls` which instead specifies `default-features = false` for `reqwest` enables the same features which are used in `object_store`: `reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-native-roots", "http2"], optional = true } ` ### Details This PR actually introduces two new feature flags: and 'internal' feature flag `default-engine-base` and the new `default-engine-rustls`. The former doesn't work on its own, we throw a compile error if you attempt to use the 'base' feature without either `default-engine` or `default-engine-rustls`: ``` cargo b -p delta_kernel --features default-engine-base Compiling delta_kernel v0.6.0 (/Users/zach.schuermann/dev/delta-kernel-rs2/kernel) error: The default-engine-base feature flag is not meant to be used directly. Please use either default-engine or default-engine-rustls. --> kernel/src/lib.rs:470:1 | 470 | / compile_error!( 471 | | "The default-engine-base feature flag is not meant to be used directly. \ 472 | | Please use either default-engine or default-engine-rustls." 473 | | ); | |_^ ``` Lastly, a new crate `feature-tests` in the workspace was created to ensure that the features work as expected. ### This PR affects the following public APIs New `default-engine-rustls` feature flag. (New private `_default-engine-base` feature flag) ## How was this change tested? New `feature-tests` crate and added to CI. ## Future work 1. this flag isn't exposed in the FFI (just normal `default-engine` is) 2. need to clean up feature flags in general (lots of overlap, etc.) 3. need to add a PresignedUrl test (does not yet exist)
- Loading branch information
1 parent
e5c14eb
commit ba37b62
Showing
9 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "feature_tests" | ||
edition.workspace = true | ||
homepage.workspace = true | ||
keywords.workspace = true | ||
license.workspace = true | ||
repository.workspace = true | ||
readme.workspace = true | ||
version.workspace = true | ||
|
||
[dependencies] | ||
delta_kernel = { path = "../kernel" } | ||
|
||
[features] | ||
default-engine = [ "delta_kernel/default-engine" ] | ||
default-engine-rustls = [ "delta_kernel/default-engine-rustls" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// This is a compilation test to ensure that the default-engine feature flags are working | ||
/// correctly. Run (from workspace root) with: | ||
/// 1. `cargo b -p feature_tests --features default-engine-rustls` | ||
/// 2. `cargo b -p feature_tests --features default-engine` | ||
/// These run in our build CI. | ||
pub fn test_default_engine_feature_flags() { | ||
#[cfg(any(feature = "default-engine", feature = "default-engine-rustls"))] | ||
{ | ||
#[allow(unused_imports)] | ||
use delta_kernel::engine::default::DefaultEngine; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters