Skip to content

Commit b6edec4

Browse files
committed
Make no default feature happy
Signed-off-by: Xuanwo <[email protected]>
1 parent ce09196 commit b6edec4

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

crates/iceberg/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ license = { workspace = true }
2929
repository = { workspace = true }
3030

3131
[features]
32-
default = ["storage-memory", "storage-fs", "storage-s3", "tokio"]
32+
default = ["storage-memory", "storage-fs", "storage-s3"]
3333
storage-all = ["storage-memory", "storage-fs", "storage-s3", "storage-gcs"]
3434

3535
storage-azdls = ["opendal/services-azdls"]
@@ -39,7 +39,6 @@ storage-memory = ["opendal/services-memory"]
3939
storage-oss = ["opendal/services-oss"]
4040
storage-s3 = ["opendal/services-s3", "reqsign"]
4141

42-
tokio = ["tokio/rt-multi-thread"]
4342

4443
[dependencies]
4544
anyhow = { workspace = true }

crates/iceberg/src/io/storage.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
#[cfg(any(
19+
feature = "storage-s3",
20+
feature = "storage-gcs",
21+
feature = "storage-oss",
22+
feature = "storage-azdls",
23+
))]
1824
use std::sync::Arc;
1925

2026
use opendal::layers::RetryLayer;
@@ -71,6 +77,7 @@ impl Storage {
7177
/// Convert iceberg config to opendal config.
7278
pub(crate) fn build(file_io_builder: FileIOBuilder) -> crate::Result<Self> {
7379
let (scheme_str, props, extensions) = file_io_builder.into_parts();
80+
let _ = (&props, &extensions);
7481
let scheme = Self::parse_scheme(&scheme_str)?;
7582

7683
match scheme {
@@ -127,6 +134,7 @@ impl Storage {
127134
path: &'a impl AsRef<str>,
128135
) -> crate::Result<(Operator, &'a str)> {
129136
let path = path.as_ref();
137+
let _ = path;
130138
let (operator, relative_path): (Operator, &str) = match self {
131139
#[cfg(feature = "storage-memory")]
132140
Storage::Memory(op) => {

crates/iceberg/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@
6666
extern crate derive_builder;
6767
extern crate core;
6868

69-
// Tokio runtime is mandatory for now; surface a clear build error if disabled.
70-
#[cfg(not(feature = "tokio"))]
71-
compile_error!("feature \"tokio\" must be enabled for iceberg runtime support");
72-
7369
mod error;
7470
pub use error::{Error, ErrorKind, Result};
7571

crates/iceberg/src/runtime/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717

1818
// This module contains the async runtime abstraction for iceberg.
1919

20-
// The crate currently mandates Tokio as the runtime. Failing early keeps build errors clear
21-
// when users try to disable the default runtime.
22-
#[cfg(not(feature = "tokio"))]
23-
compile_error!("feature \"tokio\" is required for async runtime");
24-
2520
use std::future::Future;
2621
use std::pin::Pin;
2722
use std::task::{Context, Poll};

0 commit comments

Comments
 (0)