Skip to content

Breaking change detector cannot compile datafusion-common in some cases #22005

@rluvaton

Description

@rluvaton

I saw this issue in one of the PRs I reviewed:

 set +e
  # `tee` lets cargo's output stream live into the Actions log
  # while we also keep a copy for the PR comment.
  ci/scripts/changed_crates.sh semver-check "origin/${BASE_REF}" $PACKAGES \
    2>&1 | tee /tmp/semver-output.txt
  EXIT_CODE=${PIPESTATUS[0]}
  # Pass the result through an output instead of failing the job:
  # a detected breaking change should surface as a PR comment, not a
  # red check, so PR authors aren't confused by an intentional break.
  if [ "$EXIT_CODE" -eq 0 ]; then
    echo "result=success" >> "$GITHUB_OUTPUT"
  else
    echo "result=failure" >> "$GITHUB_OUTPUT"
  fi
  shell: /usr/bin/bash -e {0}
  env:
    BASE_REF: main
    PACKAGES: datafusion-common datafusion-expr datafusion-physical-expr datafusion-functions-nested datafusion-sqllogictest
     Cloning origin/main
    Building datafusion-common v53.1.0 (current)
error: running cargo-doc on crate 'datafusion-common' failed with output:
-----
...
error[E0432]: unresolved import `object_store::buffered`
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parquet-58.1.0/src/arrow/async_writer/store.rs:25:19
    |
 25 | use object_store::buffered::BufWriter;
    |                   ^^^^^^^^ could not find `buffered` in `object_store`
    |
note: found an item that was configured out
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/object_store-0.13.2/src/lib.rs:545:9
    |
544 | #[cfg(feature = "tokio")]
    |       ----------------- the item is gated behind the `tokio` feature
545 | pub mod buffered;
    |         ^^^^^^^^

error[E0282]: type annotations needed
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parquet-58.1.0/src/arrow/async_writer/store.rs:98:13
    |
 98 | /             self.w
 99 | |                 .put(bs)
100 | |                 .await
    | |______________________^ cannot infer type

error[E0282]: type annotations needed
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/parquet-58.1.0/src/arrow/async_writer/store.rs:107:13
    |
107 | /             self.w
108 | |                 .shutdown()
109 | |                 .await
    | |______________________^ cannot infer type

Some errors have detailed explanations: E0282, E0432.
For more information about an error, try `rustc --explain E0282`.
error: could not compile `parquet` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

-----

error: failed to build rustdoc for crate datafusion-common v53.1.0
note: this is usually due to a compilation error in the crate,
      and is unlikely to be a bug in cargo-semver-checks
note: the following command can be used to reproduce the error:
      cargo new --lib example &&
          cd example &&
          echo '[workspace]' >> Cargo.toml &&
          cargo add --path /home/runner/work/datafusion/datafusion/datafusion/common --features backtrace,force_hash_collisions,object_store,parquet,parquet_encryption,recursive_protection,sql,sqlparser &&
          cargo check &&
          cargo doc

    Building datafusion-expr v53.1.0 (current)
       Built [  26.577s] (current)
     Parsing datafusion-expr v53.1.0 (current)
      Parsed [   0.072s] (current)
    Building datafusion-expr v53.1.0 (baseline)
       Built [  26.397s] (baseline)
     Parsing datafusion-expr v53.1.0 (baseline)
      Parsed [   0.072s] (baseline)
    Checking datafusion-expr v53.1.0 -> v53.1.0 (no change; assume patch)
     Checked [   1.335s] 222 checks: 220 pass, 2 fail, 0 warn, 30 skip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions