Skip to content
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

Run clippy with optional features #2918

Merged
merged 1 commit into from
Jul 16, 2022

Conversation

tustvold
Copy link
Contributor

Runs clippy in CI with optional features enabled, and fixes the issues this exposed

@github-actions github-actions bot added the core Core DataFusion crate label Jul 15, 2022
Err(err).expect(
format!(
"pyarrow not found\nExecutable: {}\nPython path: {:?}\n\
panic!("pyarrow not found\nExecutable: {}\nPython path: {:?}\n\
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error appears to have just been being lost previously, which is probably not what was intended

@@ -221,12 +221,12 @@ fn spawn_local_fifo(task: Task) {
}

#[derive(Debug, Clone)]
pub struct Spawner {
pub(crate) struct Spawner {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't ever meant to be public, it was accidentally made public as a result of moving from a crate-private module. There was no way to actually construct it, so this is not an API change

@@ -35,7 +35,7 @@ use std::sync::{Arc, Weak};
use std::task::{Context, Poll};

/// Spawns a [`PipelinePlan`] using the provided [`Spawner`]
pub fn spawn_plan(plan: PipelinePlan, spawner: Spawner) -> ExecutionResults {
pub(crate) fn spawn_plan(plan: PipelinePlan, spawner: Spawner) -> ExecutionResults {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a private module and so this change is practically unnecessary, but needed to placate clippy

@tustvold tustvold force-pushed the enable-clippy-features branch from e3a5e9c to 7b543ca Compare July 15, 2022 15:52
@@ -18,4 +18,4 @@
# under the License.

set -ex
cargo clippy --all-targets --workspace -- -D warnings
cargo clippy --all-targets --workspace --features avro,jit,pyarrow,scheduler -- -D warnings
Copy link
Contributor

@alamb alamb Jul 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried running with

Suggested change
cargo clippy --all-targets --workspace --features avro,jit,pyarrow,scheduler -- -D warnings
cargo clippy --all-targets --workspace --all-features -- -D warnings

and sadly it failed

error[E0554]: `#![feature]` may not be used on the stable release channel
   --> /Users/alamb/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/packed_simd_2-0.3.8/src/lib.rs:214:1
    |
214 | / #![feature(
215 | |     adt_const_params,
216 | |     repr_simd,
217 | |     rustc_attrs,
...   |
224 | |     custom_inner_attributes,
225 | | )]
    | |__^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly there doesn't appear to be an except feature flag

@alamb
Copy link
Contributor

alamb commented Jul 16, 2022

Thank you @tustvold

@tustvold tustvold merged commit 36b82d7 into apache:master Jul 16, 2022
@ursabot
Copy link

ursabot commented Jul 16, 2022

Benchmark runs are scheduled for baseline = d0496b0 and contender = 36b82d7. 36b82d7 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants