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

Address nightly-2024-05-05 warns #652

Merged
merged 1 commit into from May 9, 2024

Conversation

pinkforest
Copy link
Contributor

@pinkforest pinkforest commented May 8, 2024

1.80 supposedly will and nightly (2024-05-05) has introduced cfg-check spitting out some warnings.

The problem is if we declare the cfg's as intended - this will then complain about MSRV despite where we would only print these flags when rustc is >= 1.77 a.k.a this feature hard-checks MSRV and then asks to bump MSRV 1.77 despite build.rs never using the feature as gated in build.rs for below <= 1.77 as checked - I've asked clarification whether this is intended.

In order to mitigate this we can just temporarily allow the status-quo and when MSRV jumps to 1.77 we can declare them when MSRV bumps to 1.77 - it seems we can still use them just fine without making MSRV check failing.

Also need to allow two occassions unnecessary qualification (group::ff) where when only group feature is used when ff is available directrly where as it's always available via group::ff - leading to lint complaining.

EDIT: The derive conditional one is cursed - need to check that later but it seems that lint there cannot be disabled for some reason - so temporarily just made it not complain as it was in test - need to double-check it

@tarcieri
Copy link
Contributor

tarcieri commented May 8, 2024

Is there an issue with emitting e.g. cargo::rustc-check-cfg=cfg(curve25519_dalek_backend) from build.rs?

@pinkforest
Copy link
Contributor Author

pinkforest commented May 8, 2024

Yes it will result to MSRV check and it has a hard complaint to require bumping to 1.77 regardless if this is gated only to >= 1.77- fwiw I flagged this and asked whether it was intentional given bumping to MSRV 1.77 at 1.80 isn't always doable

@tarcieri
Copy link
Contributor

tarcieri commented May 8, 2024

How does that actually manifest? Do older rusts complain about it?

@pinkforest
Copy link
Contributor Author

No the new versions complain that is the problem - where we actually would declare them and where it takes effect.

@tarcieri
Copy link
Contributor

tarcieri commented May 8, 2024

Aah, I see now:

error: the cargo:: syntax for build script output instructions was added in Rust 1.77.0, but the minimum supported Rust version of curve25519-dalek v4.1.2 (/Users/tony/src/curve25519-dalek/curve25519-dalek) is 1.60.0.
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script for more information about build script outputs.

@pinkforest pinkforest changed the title Mitigate check-cfg until MSRV 1.77 Address nightly-2024-05-05 warns May 8, 2024
@pinkforest pinkforest changed the title Address nightly-2024-05-05 warns Address nightly-2024-05-05 warns May 8, 2024
@tarcieri tarcieri merged commit 9252fa5 into dalek-cryptography:main May 9, 2024
23 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants