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

Switch to Cargo instruction compatible with older versions of Cargo #838

Merged
merged 2 commits into from
May 16, 2024

Conversation

arctic-alpaca
Copy link
Contributor

Fixes #837

Copy link
Member

@Urhengulas Urhengulas left a comment

Choose a reason for hiding this comment

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

@arctic-alpaca Will this work forever or will this syntax be deprecated in favor of the new one at some point? If it is gonna be deprecated we should add a not or a tracking issue.

@arctic-alpaca
Copy link
Contributor Author

This is indeed deprecated, but required for older versions of cargo to function:
Note: The old invocation prefix cargo: (one colon only) is deprecated and won’t get any new features. To migrate, use two-colons prefix cargo::, which was added in Rust 1.77. If you were using cargo:KEY=VALUE for arbitrary links manifest key-value pairs, it is encouraged to switch to cargo::metadata=KEY=VALUE. Stick to cargo: only if the support of Rust version older than 1.77 is required.
(source)

This PR brings the newly added cargo:rustc-check-cfg instruction in line with other instructions already present, that all use the deprecated invocation prefix.

For backwards compatibility while migrating to the new prefix, a feature could be added to switch to the old prefix for those stuck on older toolchain versions.

Copy link
Member

@Urhengulas Urhengulas left a comment

Choose a reason for hiding this comment

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

I am fine with using the old syntax for now, also because it is consistent with the other invocations as you pointed out. We need to re-evaluate as soon as we need a new feature which only supports ::. Until then I think we are fine like this.

@Urhengulas Urhengulas merged commit 83467b0 into knurling-rs:main May 16, 2024
15 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.

cargo::rustc-check-cfg breaks build for older Cargo versions
2 participants