alamb opened a new pull request, #24475:
URL: https://github.com/apache/datafusion/pull/24475
## Which issue does this PR close?
- Closes #24474
## Rationale for this change
Publishing `datafusion-spark` 55.0.0 failed with
```
error[E0433]: cannot find module or crate `datafusion` in this scope
--> src/function/string/quote.rs:20:5
```
because the library referenced the optional `datafusion` dependency (only
enabled by the `core` feature) from code that is not gated on that feature.
CI did not catch this because `datafusion-cli` and `datafusion-sqllogictest`
depend on `datafusion-spark` with the `core` feature enabled, so workspace-wide
builds always compile `datafusion-spark` with the optional `datafusion`
dependency present due to feature unification. `cargo publish` builds the crate
standalone with only default features (which are empty), where the dependency
is absent.
The underlying import error was already fixed on `main` in #24351, so this
PR adds the missing CI coverage to prevent the problem from reoccurring.
## What changes are included in this PR?
Add a `cargo check datafusion-spark features` CI job, following the pattern
of the existing per-crate feature check jobs (e.g. `datafusion-functions`),
that checks the crate standalone:
- default features (`--all-targets`)
- `--no-default-features` (what `cargo publish` verifies)
- `--no-default-features --features=core`
I verified locally that the `--no-default-features` check reproduces the
exact `E0433` error from #24474 when the pre-#24351 import is reintroduced, and
that all three checks pass on `main`.
## Are these changes tested?
Yes, by CI itself (the new job runs on this PR). The commands were also run
locally and pass.
## Are there any user-facing changes?
No, CI only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]