Skip to content

Commit 1db904b

Browse files
authored
bug: build fails with --no-default-features (#1255)
1 parent f75ec91 commit 1db904b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/rust.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ jobs:
121121
env:
122122
CARGO_HOME: "/github/home/.cargo"
123123
CARGO_TARGET_DIR: "/github/home/target"
124+
- name: Try to compile when `--no-default-features` is selected
125+
run: |
126+
export PATH=$PATH:$HOME/d/protoc/bin
127+
export ARROW_TEST_DATA=$(pwd)/testing/data
128+
export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
129+
cargo build -p ballista-scheduler -p ballista-executor -p ballista-core -p ballista --no-default-features
130+
env:
131+
CARGO_HOME: "/github/home/.cargo"
132+
CARGO_TARGET_DIR: "/github/home/target"
124133

125134
# run ballista tests
126135
ballista-test:

ballista/scheduler/src/cluster/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use std::collections::{HashMap, HashSet};
1919
use std::pin::Pin;
2020
use std::sync::Arc;
2121

22-
use clap::ValueEnum;
2322
use datafusion::common::tree_node::TreeNode;
2423
use datafusion::common::tree_node::TreeNodeRecursion;
2524
use datafusion::datasource::listing::PartitionedFile;
@@ -57,16 +56,18 @@ pub mod test_util;
5756

5857
// an enum used to configure the backend
5958
// needs to be visible to code generated by configure_me
60-
#[derive(Debug, Clone, ValueEnum, serde::Deserialize, PartialEq, Eq)]
59+
#[derive(Debug, Clone, serde::Deserialize, PartialEq, Eq)]
60+
#[cfg_attr(feature = "build-binary", derive(clap::ValueEnum))]
6161
pub enum ClusterStorage {
6262
Memory,
6363
}
6464

65+
#[cfg(feature = "build-binary")]
6566
impl std::str::FromStr for ClusterStorage {
6667
type Err = String;
6768

6869
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
69-
ValueEnum::from_str(s, true)
70+
clap::ValueEnum::from_str(s, true)
7071
}
7172
}
7273
#[cfg(feature = "build-binary")]

0 commit comments

Comments
 (0)