test: relax bad_crate_type to only match error message prefix#14990
Merged
weihanglo merged 1 commit intorust-lang:masterfrom Dec 29, 2024
Merged
test: relax bad_crate_type to only match error message prefix#14990weihanglo merged 1 commit intorust-lang:masterfrom
bad_crate_type to only match error message prefix#14990weihanglo merged 1 commit intorust-lang:masterfrom
Conversation
So that the cargo test isn't sensitive to suggestions for known crate types that a rustc PR <rust-lang/rust#134720> is trying to add.
Collaborator
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Member
Author
|
r? @weihanglo (sorry forgot to r/?) |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 31, 2024
Update cargo 5 commits in c86f4b3a1b153218e6e50861214b0b4b4e695f23..d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7 2024-12-24 17:49:48 +0000 to 2024-12-31 20:51:21 +0000 - fix(package): warn if symlinks checked out as plain text files (rust-lang/cargo#14994) - test: track caller for `.crate` file publish verification (rust-lang/cargo#14992) - test: relax panic output assertion (rust-lang/cargo#14989) - test: relax `bad_crate_type` to only match error message prefix (rust-lang/cargo#14990) - refactor(package): split `cargo_package` to modules (rust-lang/cargo#14982) r? ghost
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.
What does this PR try to resolve?
This PR relaxes the
bad_crate_typetest to have it only match the prefix of the unknown crate type error message emitted by rustc.This is so that the cargo test isn't sensitive to (future) suggestions for known crate types that rustc may emit to help the user.
How should we test and review this PR?
This test should already be run as part of cargo CI. (This is definitely run as part of rust-lang/rust CI, lol.)
Additional information
rust-lang/rust side PR that's trying to add a suffix to the bad crate type error message to list all valid
--crate-typevalues: rust-lang/rust#134720.Without relaxing this test, the rust-lang/rust side PR fails with:
rust-lang/rust CI fail message
(Ignore the missing colon after
unknown crate type)Discussed at https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Reblessing.20a.20cargo.20test.