-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
test: migrate unit_graph, update and vendor to snapbox #14119
Conversation
r? @weihanglo rustbot has assigned @weihanglo. Use |
7d12956
to
bf577ac
Compare
"\ | ||
error: the argument '--precise <PRECISE>' cannot be used with '--recursive' | ||
.with_stderr_data(str![[r#" | ||
[ERROR] the argument '--precise <PRECISE>' cannot be used with '--recursive' | ||
|
||
Usage: cargo[EXE] update --precise <PRECISE> <SPEC|--package [<SPEC>]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding an auto-redaction for cargo[EXE]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you expand on why?
If we could redact cargo
and cargo.exe
to a [CARGO_BIN]
that would remove the need for Linux users to add [EXE]
at the end when they see CI fail. However, I don't think we can definitively say the bare word cargo
should map to CARGO_BIN
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my experience implementing recent PRs, my workflow has been to simply replace the content of deprecated functions and rely on the tests to overwrite them. I then compare the overwritten versions with the originals and make necessary modifications.
However, currently, binary paths on Darwin/Linux platforms lack the [EXE]
extension, and you need to add it manually.
I am also fine with appending [EXE]
to the binary (including bin:
, [EXECUTABLE]
, other binaries in ../bin/target
, etc.) which should significantly improve the user experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so it was to try to find a way to avoid manually adding [EXE]
. I wish there was a way to automate this but I cannot think of one.
.with_stderr_data(str![[r#" | ||
[UPDATING] git repository `[ROOTURL]/rustdns` | ||
[LOCKING] 3 packages to latest compatible versions | ||
", | ||
git_project.url(), | ||
)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: This remove git_project.url()
.with_stderr_data(str![[r#" | ||
[UPDATING] git repository `[ROOTURL]/rustdns` | ||
[LOCKING] 3 packages to latest compatible versions | ||
", | ||
git_project.url(), | ||
)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: This remove git_project.url()
.with_stderr_data(str![[r#" | ||
[UPDATING] git repository `[ROOTURL]/rustdns` | ||
[LOCKING] 3 packages to latest compatible versions | ||
", | ||
git_project.url(), | ||
)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: This remove git_project.url()
"\ | ||
[UPDATING] git repository `{url}` | ||
[UPDATING] git v0.5.0 ([..]) -> #{}", | ||
[UPDATING] git repository `[ROOTURL]/git` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: This remove url
"\ | ||
[UPDATING] git repository `{url}` | ||
[UPDATING] git v0.5.0 ([..]) -> #{short_id}", | ||
[UPDATING] git repository `[ROOTURL]/git` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: This remove url
"\ | ||
[UPDATING] git repository `{url}` | ||
[UPDATING] git v0.5.0 ([..]) -> #{}", | ||
[UPDATING] git repository `[ROOTURL]/git` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: This remove url
"\ | ||
[UPDATING] git repository `{url}` | ||
[UPDATING] git v0.5.0 ([..]) -> #{}", | ||
[UPDATING] git repository `[ROOTURL]/git` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up: This remove url
@@ -841,6 +843,7 @@ fn git_complex() { | |||
[package] | |||
name = "foo" | |||
version = "0.1.0" | |||
edition = "2021" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a default edition to prevent [WARNING] no edition set: defaulting to the 2015 edition while the latest is 2021
.
@@ -1087,6 +1103,7 @@ fn config_instructions_works() { | |||
[package] | |||
name = "foo" | |||
version = "0.1.0" | |||
edition = "2021" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a default edition to prevent [WARNING] no edition set: defaulting to the 2015 edition while the latest is 2021
.
@@ -1254,6 +1284,7 @@ fn vendor_crate_with_ws_inherit() { | |||
[package] | |||
name = "foo" | |||
version = "0.1.0" | |||
edition = "2021" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a default edition to prevent [WARNING] no edition set: defaulting to the 2015 edition while the latest is 2021
.
Thanks! @bors r+ |
☀️ Test successful - checks-actions |
Update cargo 17 commits in 3ed207e416fb2f678a40cc79c02dcf4f936a21ce..bc89bffa5987d4af8f71011c7557119b39e44a65 2024-06-18 19:18:22 +0000 to 2024-06-22 00:36:36 +0000 - test: migrate weak_dep_features, workspaces and yank to snapbox (rust-lang/cargo#14111) - test: migrate features and features(2|_namespaced) to snapbox (rust-lang/cargo#14100) - test: Add auto-redaction for not found error (rust-lang/cargo#14124) - test: migrate build to snapbox (rust-lang/cargo#14068) - test: migrate unit_graph, update and vendor to snapbox (rust-lang/cargo#14119) - fix(test): Un-redact Packaged files (rust-lang/cargo#14123) - test: Auto-redact file number (rust-lang/cargo#14121) - test: migrate lints_table and lints/(mod|unknown_lints) to snapbox (rust-lang/cargo#14104) - Simplify checking feature syntax (rust-lang/cargo#14106) - test: migrate testsuites to snapbox (rust-lang/cargo#14091) - Make `-Cmetadata` consistent across platforms (rust-lang/cargo#14107) - fix(toml): Warn when edition is unuset, even when MSRV is unset (rust-lang/cargo#14110) - Add `CodeFix::apply_solution` and impl `Clone` (rust-lang/cargo#14092) - test: migrate `cargo_alias_config&cargo_config/mod` to snapbox (rust-lang/cargo#14093) - Simplify checking for dependency cycles (rust-lang/cargo#14089) - test: Migrate `pub_priv.rs` to snapshot (rust-lang/cargo#14103) - test: migrate rustdoc and rustdocflags to snapbox (rust-lang/cargo#14098) <!-- r? ghost -->
Update cargo 17 commits in 3ed207e416fb2f678a40cc79c02dcf4f936a21ce..bc89bffa5987d4af8f71011c7557119b39e44a65 2024-06-18 19:18:22 +0000 to 2024-06-22 00:36:36 +0000 - test: migrate weak_dep_features, workspaces and yank to snapbox (rust-lang/cargo#14111) - test: migrate features and features(2|_namespaced) to snapbox (rust-lang/cargo#14100) - test: Add auto-redaction for not found error (rust-lang/cargo#14124) - test: migrate build to snapbox (rust-lang/cargo#14068) - test: migrate unit_graph, update and vendor to snapbox (rust-lang/cargo#14119) - fix(test): Un-redact Packaged files (rust-lang/cargo#14123) - test: Auto-redact file number (rust-lang/cargo#14121) - test: migrate lints_table and lints/(mod|unknown_lints) to snapbox (rust-lang/cargo#14104) - Simplify checking feature syntax (rust-lang/cargo#14106) - test: migrate testsuites to snapbox (rust-lang/cargo#14091) - Make `-Cmetadata` consistent across platforms (rust-lang/cargo#14107) - fix(toml): Warn when edition is unuset, even when MSRV is unset (rust-lang/cargo#14110) - Add `CodeFix::apply_solution` and impl `Clone` (rust-lang/cargo#14092) - test: migrate `cargo_alias_config&cargo_config/mod` to snapbox (rust-lang/cargo#14093) - Simplify checking for dependency cycles (rust-lang/cargo#14089) - test: Migrate `pub_priv.rs` to snapshot (rust-lang/cargo#14103) - test: migrate rustdoc and rustdocflags to snapbox (rust-lang/cargo#14098) <!-- r? ghost -->
What does this PR try to resolve?
Part of #14039.
Migrate following to snapbox:
tests/testsuite/unit_graph.rs
tests/testsuite/update.rs
tests/testsuite/vendor.rs