You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jonahgao (via GitHub)" <gi...@apache.org> on 2025/01/10 08:04:21 UTC
[PR] Fix clippy for Rust 1.84 [datafusion]
jonahgao opened a new pull request, #14065:
URL: https://github.com/apache/datafusion/pull/14065
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #14061.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
Yes
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
## Are there any user-facing changes?
No
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "jonahgao (via GitHub)" <gi...@apache.org>.
jonahgao commented on PR #14065:
URL: https://github.com/apache/datafusion/pull/14065#issuecomment-2582092984
> @jonahgao does linter pass in your local after this change?
Yes, it passed. Do you encounter any issues?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada commented on PR #14065:
URL: https://github.com/apache/datafusion/pull/14065#issuecomment-2582412339
> > @jonahgao does linter pass in your local after this change?
>
> Yes, it passed. Do you encounter any issues?
```
cargo clippy --all-targets --workspace --features avro,pyarrow -- -D warnings
Checking ffi_module_interface v0.1.0 (/Users/berkaysahin/Desktop/datafusion/datafusion-examples/examples/ffi/ffi_module_interface)
Checking datafusion-wasmtest v44.0.0 (/Users/berkaysahin/Desktop/datafusion/datafusion/wasmtest)
Checking datafusion-ffi v44.0.0 (/Users/berkaysahin/Desktop/datafusion/datafusion/ffi)
Checking datafusion-benchmarks v44.0.0 (/Users/berkaysahin/Desktop/datafusion/benchmarks)
error: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
--> datafusion/wasmtest/src/lib.rs:47:1
|
47 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `tarpaulin`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(wasm_bindgen_unstable_test_coverage)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `-D unexpected-cfgs` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
--> datafusion/wasmtest/src/lib.rs:67:1
|
67 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^
|
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(wasm_bindgen_unstable_test_coverage)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `datafusion-wasmtest` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `datafusion-wasmtest` (lib test) due to 2 previous errors
```
These unexpected cfg conditions are changing at each try. I couldn't quickly understand the reason of these errors.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada commented on PR #14065:
URL: https://github.com/apache/datafusion/pull/14065#issuecomment-2582075524
@jonahgao does linter pass in your local after this change?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #14065:
URL: https://github.com/apache/datafusion/pull/14065#discussion_r1910263895
##########
datafusion/common/src/pyarrow.rs:
##########
@@ -138,6 +138,9 @@ mod tests {
fn test_py_scalar() {
init_python();
+ // TODO: remove this attribute when bumping pyo3 to v0.23.0
+ // See: <https://github.com/PyO3/pyo3/blob/v0.23.0/guide/src/migration.md#gil-refs-feature-removed>
+ #[allow(unexpected_cfgs)]
Review Comment:
pyo3 will be updated in
- https://github.com/apache/datafusion/pull/13663
I need to find some time to polish that PR a bit
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "mbrobbel (via GitHub)" <gi...@apache.org>.
mbrobbel commented on PR #14065:
URL: https://github.com/apache/datafusion/pull/14065#issuecomment-2582417847
> > > @jonahgao does linter pass in your local after this change?
> >
> >
> > Yes, it passed. Do you encounter any issues?
>
> ```
> cargo clippy --all-targets --workspace --features avro,pyarrow -- -D warnings
> Checking ffi_module_interface v0.1.0 (/Users/berkaysahin/Desktop/datafusion/datafusion-examples/examples/ffi/ffi_module_interface)
> Checking datafusion-wasmtest v44.0.0 (/Users/berkaysahin/Desktop/datafusion/datafusion/wasmtest)
> Checking datafusion-ffi v44.0.0 (/Users/berkaysahin/Desktop/datafusion/datafusion/ffi)
> Checking datafusion-benchmarks v44.0.0 (/Users/berkaysahin/Desktop/datafusion/benchmarks)
> error: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
> --> datafusion/wasmtest/src/lib.rs:47:1
> |
> 47 | #[wasm_bindgen]
> | ^^^^^^^^^^^^^^^
> |
> = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `tarpaulin`, `test`, `ub_checks`, `unix`, and `windows`
> = help: consider using a Cargo feature instead
> = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
> [lints.rust]
> unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }
> = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(wasm_bindgen_unstable_test_coverage)");` to the top of the `build.rs`
> = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
> = note: `-D unexpected-cfgs` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
> = note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> error: unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
> --> datafusion/wasmtest/src/lib.rs:67:1
> |
> 67 | #[wasm_bindgen]
> | ^^^^^^^^^^^^^^^
> |
> = help: consider using a Cargo feature instead
> = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
> [lints.rust]
> unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }
> = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(wasm_bindgen_unstable_test_coverage)");` to the top of the `build.rs`
> = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
> = note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> error: could not compile `datafusion-wasmtest` (lib) due to 2 previous errors
> warning: build failed, waiting for other jobs to finish...
> error: could not compile `datafusion-wasmtest` (lib test) due to 2 previous errors
> ```
>
> These unexpected cfg conditions are changing at each try. I couldn't quickly understand the reason of these errors.
Can you try again after `cargo update wasm-bindgen`? This was fixed in https://github.com/rustwasm/wasm-bindgen/pull/4284.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada merged PR #14065:
URL: https://github.com/apache/datafusion/pull/14065
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada commented on PR #14065:
URL: https://github.com/apache/datafusion/pull/14065#issuecomment-2582438534
> Can you try again after `cargo update wasm-bindgen`? This was fixed in [rustwasm/wasm-bindgen#4284](https://github.com/rustwasm/wasm-bindgen/pull/4284).
That works, thank you.
```
Checking datafusion-expr v44.0.0 (/Users/berkaysahin/Desktop/datafusion/datafusion/expr)
error: unexpected `cfg` condition value: `used_linker`
--> datafusion/expr/src/lib.rs:101:1
|
101 | #[ctor::ctor]
| ^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `recursive_protection`
= help: consider adding `used_linker` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `-D unexpected-cfgs` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
= note: this error originates in the attribute macro `ctor::ctor` (in Nightly builds, run with -Z macro-backtrace for more info);
```
Do you have a remedy for this one as well :D ?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Fix clippy for Rust 1.84 [datafusion]
Posted by "mbrobbel (via GitHub)" <gi...@apache.org>.
mbrobbel commented on PR #14065:
URL: https://github.com/apache/datafusion/pull/14065#issuecomment-2582467124
> > Can you try again after `cargo update wasm-bindgen`? This was fixed in [rustwasm/wasm-bindgen#4284](https://github.com/rustwasm/wasm-bindgen/pull/4284).
>
> That works, thank you.
>
> ```
> Checking datafusion-expr v44.0.0 (/Users/berkaysahin/Desktop/datafusion/datafusion/expr)
> error: unexpected `cfg` condition value: `used_linker`
> --> datafusion/expr/src/lib.rs:101:1
> |
> 101 | #[ctor::ctor]
> | ^^^^^^^^^^^^^
> |
> = note: expected values for `feature` are: `recursive_protection`
> = help: consider adding `used_linker` as a feature in `Cargo.toml`
> = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
> = note: `-D unexpected-cfgs` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(unexpected_cfgs)]`
> = note: this error originates in the attribute macro `ctor::ctor` (in Nightly builds, run with -Z macro-backtrace for more info);
> ```
>
> Do you have a remedy for this one as well 😄 ?
https://github.com/mmastrac/rust-ctor/issues/309#issuecomment-2489037492
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org