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

test: migrate unit_graph, update and vendor to snapbox #14119

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

eth3lbert
Copy link
Contributor

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

@rustbot
Copy link
Collaborator

rustbot commented Jun 21, 2024

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 21, 2024
@eth3lbert eth3lbert force-pushed the snapbox-uuv branch 2 times, most recently from 7d12956 to bf577ac Compare June 21, 2024 07:04
"\
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>]>
Copy link
Contributor Author

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].

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Comment on lines +1101 to +1104
.with_stderr_data(str![[r#"
[UPDATING] git repository `[ROOTURL]/rustdns`
[LOCKING] 3 packages to latest compatible versions
",
git_project.url(),
))

Copy link
Contributor Author

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()

Comment on lines +1191 to +1194
.with_stderr_data(str![[r#"
[UPDATING] git repository `[ROOTURL]/rustdns`
[LOCKING] 3 packages to latest compatible versions
",
git_project.url(),
))

Copy link
Contributor Author

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()

Comment on lines +1281 to +1284
.with_stderr_data(str![[r#"
[UPDATING] git repository `[ROOTURL]/rustdns`
[LOCKING] 3 packages to latest compatible versions
",
git_project.url(),
))

Copy link
Contributor Author

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`
Copy link
Contributor Author

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`
Copy link
Contributor Author

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`
Copy link
Contributor Author

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`
Copy link
Contributor Author

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"
Copy link
Contributor Author

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"
Copy link
Contributor Author

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"
Copy link
Contributor Author

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.

@epage
Copy link
Contributor

epage commented Jun 21, 2024

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 21, 2024

📌 Commit f978616 has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 21, 2024
@bors
Copy link
Collaborator

bors commented Jun 21, 2024

⌛ Testing commit f978616 with merge ce90393...

@bors
Copy link
Collaborator

bors commented Jun 21, 2024

☀️ Test successful - checks-actions
Approved by: epage
Pushing ce90393 to master...

@bors bors merged commit ce90393 into rust-lang:master Jun 21, 2024
22 checks passed
@eth3lbert eth3lbert deleted the snapbox-uuv branch June 21, 2024 18:36
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 22, 2024
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
-->
@rustbot rustbot added this to the 1.81.0 milestone Jun 22, 2024
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jun 23, 2024
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
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants