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

Clippy nightly fails #51

Closed
dleifeld opened this issue Jan 14, 2025 · 4 comments
Closed

Clippy nightly fails #51

dleifeld opened this issue Jan 14, 2025 · 4 comments

Comments

@dleifeld
Copy link
Collaborator

error: unexpected cfg condition name: test
--> hdbconnect_impl/src/conn/authentication/scram_sha256.rs:84:7
|
84 | #[cfg(test)]
| ^^^^
|
= help: expected names are: clippy, debug_assertions, doc, docsrs, doctest, feature, fmt_debug, miri, overflow_checks, panic, proc_macro, relocatio n_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_loc al, target_vendor, 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(test)'] }
= help: or consider adding println!("cargo::rustc-check-cfg=cfg(test)"); 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)]

@emabee
Copy link
Owner

emabee commented Jan 15, 2025

Hm, looks like a bug in clippy nightly. I can't reproduce it, maybe it is fixed already?
#[cfg(test)] is a very old standard way of marking code as test-only.

@dleifeld
Copy link
Collaborator Author

This succeeds in terminal:

cargo +nightly clippy --all-targets --package hdbconnect --all-features -- -D warnings

but fails with run_command!(
So not blocking release

@emabee
Copy link
Owner

emabee commented Jan 20, 2025

That's weird! I can reproduce this, and thus opened issue 14045 for clippy.

And you're right - this should not block us from releasing a new version!

I provided a proposal how to deal with semver versions in this project. If you agree, I'd suggest you push and publish :-)

@emabee
Copy link
Owner

emabee commented Jan 23, 2025

Thanks to the help we received in issue 14045 for clippy I could add a workaround to the qualification script. It should be working again as usual.

@emabee emabee closed this as completed Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants