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

chore: emit rustc-check-cfg for nightly #9850

Merged
merged 5 commits into from
May 24, 2024
Merged

Conversation

JonasKruckenberg
Copy link
Member

The old cargo: instruction syntax has been deprecated with version 1.77 and newer features (such as the check-cfg feature introduced in 1.79) require the new double colon cargo:: syntax.
This change keeps the old syntax around since it is ignored on newer versions and still necessary for our MSRV policy.

@JonasKruckenberg JonasKruckenberg requested a review from a team as a code owner May 22, 2024 08:42
@@ -211,7 +211,9 @@ fn copy_frameworks(dest_dir: &Path, frameworks: &[String]) -> Result<()> {
// creates a cfg alias if `has_feature` is true.
// `alias` must be a snake case string.
fn cfg_alias(alias: &str, has_feature: bool) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we pretty much have this function on all crates, can you also update those? just search for cargo:rustc-cfg

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing

@amrbashir
Copy link
Member

amrbashir commented May 22, 2024

is it okay to bump MSRV to 1.77? seems too soon even for beta

@JonasKruckenberg
Copy link
Member Author

JonasKruckenberg commented May 23, 2024

Its not bumping the MSRV, since the old syntax style instructions will still be emitted as well

@amrbashir
Copy link
Member

amrbashir commented May 23, 2024

ah my bad, didn't look carefully and thought we are replacing old syntax. You even wrote that in the PR description 🤦‍♂️

@lucasfernog lucasfernog changed the title fix(tauri-build): emit cargo cfg alias using new syntax too chore: emit rustc-check-cfg for nightly linting May 24, 2024
@lucasfernog
Copy link
Member

lucasfernog commented May 24, 2024

We must use cargo: instead of cargo:: until we raise our MSRV. Also we do not need to duplicate the instructions, Cargo still supports the cargo: syntax. This was verified by running cargo +nightly clippy with latest nightly.

@lucasfernog lucasfernog changed the title chore: emit rustc-check-cfg for nightly linting chore: emit rustc-check-cfg for nightly May 24, 2024
@lucasfernog lucasfernog merged commit 9ac9303 into dev May 24, 2024
20 checks passed
@lucasfernog lucasfernog deleted the JonasKruckenberg-patch-1 branch May 24, 2024 16:12
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.

3 participants