Add a future-compatibility warning on allowed feature name characters.#8814
Merged
bors merged 1 commit intorust-lang:masterfrom Oct 28, 2020
Merged
Add a future-compatibility warning on allowed feature name characters.#8814bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors: r+ Looks good to me, thanks! We historically haven't ever had a way to silence Cargo warnings, they're all intended to be immediately actionable and not ones you'd want to silence in theory. If this becomes an issue though we can always turn it back off and figure out a way to deal with warnings. |
Contributor
|
📌 Commit b731190 has been approved by |
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
that referenced
this pull request
Jun 20, 2023
Convert valid feature name warning to an error. This converts the feature name validation check from a warning to an error. This was added in #8814 in Rust 1.49 released in 2020-12-31 (about 2.5 years ago) with a warning that it will become a hard error in the future. These extended characters aren't allowed on crates.io, so this should only impact users of other registries, or people who don't publish to a registry. The warning message requested anyone impacted by it to let us know. We got one report, and added support for . as result. Since there weren't any other reports, I think it should be pretty safe to move forward. The diff here is a little large because it removes the pass-through of `config` since it isn't needed anymore. Additionally, the tests were restructured since testing every edge case in an integration test has a lot of overhead. Instead, there is now a unit test which runs much faster, with the integration test just verifying that it fires and checks the two forms of error messages. Closes #8813
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a restriction on the valid syntax of a feature name. An warning is issued if a feature does not match the new validation, with the intent that it will be an error in the future.
The new restriction is:
_._, or most letters),-, or+.The changes around passing in
configtoSummarycan mostly be reverted when this is changed to an error.I'm a little concerned that we don't have a mechanism to silence the warning. Should we add one?