cargo-test-support: Add features to the default Cargo.toml file#12997
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 22, 2023
Merged
cargo-test-support: Add features to the default Cargo.toml file#12997bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Collaborator
|
r? @epage (rustbot has picked a reviewer for you, use r? to override) |
95626ed to
ecf8671
Compare
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
ecf8671 to
4c07538
Compare
0xPoe
commented
Nov 19, 2023
tests/testsuite/metadata.rs
Outdated
| } | ||
|
|
||
| #[cargo_test] | ||
| fn cargo_metadata_with_registered_dep() { |
Member
Author
There was a problem hiding this comment.
I am not sure if this test case is necessary. But we don't have a test for feature names. So I added it. Please let me know if we have a better way to cover it.
Contributor
There was a problem hiding this comment.
We have tests for features, just not from transitive dependencies. Unsure if this is providing enough value.
Member
Author
There was a problem hiding this comment.
I dropped it. It is not a test for the real case, so it might not be worth adding it.
4c07538 to
504c4b2
Compare
Contributor
|
@bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 25, 2023
Update cargo 7 commits in 71cd3a926f0cf41eeaf9f2a7f2194b2aff85b0f6..9b13310ca596020a737aaa47daa4ed9ff8898a2f 2023-11-20 15:30:57 +0000 to 2023-11-24 16:20:51 +0000 - feat: Add `CARGO_RUSTC_CURRENT_DIR` (unstable) (rust-lang/cargo#12996) - Exited with hard error when custom build file no existence or not in package (rust-lang/cargo#12995) - try running on windows (rust-lang/cargo#13042) - refactor(toml): Better abstract inheritance details (rust-lang/cargo#13021) - cargo-test-support: Add features to the default Cargo.toml file (rust-lang/cargo#12997) - Migrate rustfix to the cargo repo (rust-lang/cargo#13005) - typo: rusc -> rustc (rust-lang/cargo#13019) --- This also removes the check to ensure that `rustfix` between * src/tools/cargo * src/tools/compiletest has the same version, since `rust-lang/rustfix` has migrated to under `rust-lang/cargo`. r? ghost
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Nov 27, 2023
Update cargo 7 commits in 71cd3a926f0cf41eeaf9f2a7f2194b2aff85b0f6..9b13310ca596020a737aaa47daa4ed9ff8898a2f 2023-11-20 15:30:57 +0000 to 2023-11-24 16:20:51 +0000 - feat: Add `CARGO_RUSTC_CURRENT_DIR` (unstable) (rust-lang/cargo#12996) - Exited with hard error when custom build file no existence or not in package (rust-lang/cargo#12995) - try running on windows (rust-lang/cargo#13042) - refactor(toml): Better abstract inheritance details (rust-lang/cargo#13021) - cargo-test-support: Add features to the default Cargo.toml file (rust-lang/cargo#12997) - Migrate rustfix to the cargo repo (rust-lang/cargo#13005) - typo: rusc -> rustc (rust-lang/cargo#13019) --- This also removes the check to ensure that `rustfix` between * src/tools/cargo * src/tools/compiletest has the same version, since `rust-lang/rustfix` has migrated to under `rust-lang/cargo`. 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?
Found in 0xPoe/cargo-information#32 (comment).
I think we need to add features to the default
Cargo.tomlfile.How should we test and review this PR?
Additional information
Do you which Cargo command can cover this case? I want to add a unit test for it.
It seems I can use
cargo metadatato cover it. I can add a dep to the package and try to check the output JSON.