-
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
chore: Update snapbox #13441
Merged
Merged
chore: Update snapbox #13441
Conversation
This file contains 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
rustbot
added
A-testing-cargo-itself
Area: cargo's tests
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Feb 15, 2024
epage
force-pushed
the
snapbox
branch
3 times, most recently
from
February 15, 2024 19:33
f222712
to
25ae68b
Compare
Rustin170506
approved these changes
Feb 16, 2024
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.
Looks good to me. Thanks! 👍
1 task
Snapbox's polyfill for `CARGO_RUSTC_CURRENT_DIR` looks for the furthest away `Cargo.toml`. That works in our repo but won't work as a submodule in rustc. This uses the `config.toml` hack for setting the variable. I verified - Without this, the polyfill is used - With this, it is used - Without this on nightly, the official `CARGO_RUSTC_CURRENT_DIR` is used
rustbot
added
the
A-infrastructure
Area: infrastructure around the cargo repo, ci, releases, etc.
label
Feb 16, 2024
This looks good to me! I am a little worried about this working in |
@bors r+ |
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
Feb 16, 2024
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 17, 2024
Update cargo 11 commits in fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3..9090349adc88e0fcae2644c2cceb830124a10d5d 2024-02-09 15:54:29 +0000 to 2024-02-16 16:56:57 +0000 - chore: Update snapbox (rust-lang/cargo#13441) - chore(deps): update openssl to 3.2.1 again (rust-lang/cargo#13449) - fix(test): Suggest `--` for libtest arguments (rust-lang/cargo#13448) - chore(ci): Drop MSRV:1 patch field (rust-lang/cargo#13442) - fix(add): Remove inconsistent period (rust-lang/cargo#13446) - fix(add): Ensure users know a feature is being created (rust-lang/cargo#13434) - Update tests for changes in latest nightly (rust-lang/cargo#13444) - docs: Minor clarification of build script metadata. (rust-lang/cargo#13436) - Fix old_cargos tests (rust-lang/cargo#13435) - Fix confusing error messages for sparse index replaced source (rust-lang/cargo#13433) - Enable edition migration for 2024 (rust-lang/cargo#13429) r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 17, 2024
Update cargo 11 commits in fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3..9090349adc88e0fcae2644c2cceb830124a10d5d 2024-02-09 15:54:29 +0000 to 2024-02-16 16:56:57 +0000 - chore: Update snapbox (rust-lang/cargo#13441) - chore(deps): update openssl to 3.2.1 again (rust-lang/cargo#13449) - fix(test): Suggest `--` for libtest arguments (rust-lang/cargo#13448) - chore(ci): Drop MSRV:1 patch field (rust-lang/cargo#13442) - fix(add): Remove inconsistent period (rust-lang/cargo#13446) - fix(add): Ensure users know a feature is being created (rust-lang/cargo#13434) - Update tests for changes in latest nightly (rust-lang/cargo#13444) - docs: Minor clarification of build script metadata. (rust-lang/cargo#13436) - Fix old_cargos tests (rust-lang/cargo#13435) - Fix confusing error messages for sparse index replaced source (rust-lang/cargo#13433) - Enable edition migration for 2024 (rust-lang/cargo#13429) r? ghost
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 18, 2024
Update cargo 12 commits in fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3..7b7af3077bff8d60b7f124189bc9de227d3063a9 2024-02-09 15:54:29 +0000 to 2024-02-17 14:13:00 +0000 - Remove unnecessary `use` statement in metabuild (rust-lang/cargo#13455) - chore: Update snapbox (rust-lang/cargo#13441) - chore(deps): update openssl to 3.2.1 again (rust-lang/cargo#13449) - fix(test): Suggest `--` for libtest arguments (rust-lang/cargo#13448) - chore(ci): Drop MSRV:1 patch field (rust-lang/cargo#13442) - fix(add): Remove inconsistent period (rust-lang/cargo#13446) - fix(add): Ensure users know a feature is being created (rust-lang/cargo#13434) - Update tests for changes in latest nightly (rust-lang/cargo#13444) - docs: Minor clarification of build script metadata. (rust-lang/cargo#13436) - Fix old_cargos tests (rust-lang/cargo#13435) - Fix confusing error messages for sparse index replaced source (rust-lang/cargo#13433) - Enable edition migration for 2024 (rust-lang/cargo#13429)
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Feb 18, 2024
Update cargo 12 commits in fc1d58fd0531a57a6b942a14cdcdbcb82ece16f3..7b7af3077bff8d60b7f124189bc9de227d3063a9 2024-02-09 15:54:29 +0000 to 2024-02-17 14:13:00 +0000 - Remove unnecessary `use` statement in metabuild (rust-lang/cargo#13455) - chore: Update snapbox (rust-lang/cargo#13441) - chore(deps): update openssl to 3.2.1 again (rust-lang/cargo#13449) - fix(test): Suggest `--` for libtest arguments (rust-lang/cargo#13448) - chore(ci): Drop MSRV:1 patch field (rust-lang/cargo#13442) - fix(add): Remove inconsistent period (rust-lang/cargo#13446) - fix(add): Ensure users know a feature is being created (rust-lang/cargo#13434) - Update tests for changes in latest nightly (rust-lang/cargo#13444) - docs: Minor clarification of build script metadata. (rust-lang/cargo#13436) - Fix old_cargos tests (rust-lang/cargo#13435) - Fix confusing error messages for sparse index replaced source (rust-lang/cargo#13433) - Enable edition migration for 2024 (rust-lang/cargo#13429)
epage
added a commit
to epage/cargo
that referenced
this pull request
Mar 26, 2024
This provides what cargo sets as the `current_dir` for the `rustc` process. While `std::file!` is unspecified in what it is relative to, it is relatively safe, it is generally relative to `rustc`s `current_dir`. This can be useful for snapshot testing. For example, `snapbox` has been using this macro on nightly since assert-rs/snapbox#247, falling back to finding a parent of `CARGO_MANIFEST_DIR`, if present. This has been in use in Cargo since rust-lang#13441. This was added in rust-lang#12996. Relevant points discussed in that issue: - This diverged from the original proposal from the Cargo team of having a `CARGO_WORKSPACE_DIR` that is the "workspace" of the package being built (ie registry packages would map to `CARGO_MANIFEST_DIR`). In looking at the `std::file!` use case, `CARGO_MANIFEST_DIR`, no matter how we defined it, would only sort of work because no sane definition of that maps to `rustc`'s `current_dir`.a This instead focuses on the mechanism currently being used. - Using "current dir" in the name is meant to be consistent with `std::env::current_dir`. - I can go either way on `CARGO_RUSTC` vs `RUSTC`. Existing related variables: - `RUSTC` - `RUSTC_WRAPPER` - `RUSTC_WORKSPACE_WRAPPER` - `RUSTFLAGS` (no `C`) - `CARGO_CACHE_RUSTC_INFO` Note that rust-lang#3946 was overly broad and covered many use cases. One of those was for packages to look up information on their dependents. Issue rust-lang#13484 is being left open to track that. Fixes rust-lang#3946
epage
added a commit
to epage/cargo
that referenced
this pull request
May 21, 2024
This provides what cargo sets as the `current_dir` for the `rustc` process. While `std::file!` is unspecified in what it is relative to, it is relatively safe, it is generally relative to `rustc`s `current_dir`. This can be useful for snapshot testing. For example, `snapbox` has been using this macro on nightly since assert-rs/snapbox#247, falling back to finding a parent of `CARGO_MANIFEST_DIR`, if present. This has been in use in Cargo since rust-lang#13441. This was added in rust-lang#12996. Relevant points discussed in that issue: - This diverged from the original proposal from the Cargo team of having a `CARGO_WORKSPACE_DIR` that is the "workspace" of the package being built (ie registry packages would map to `CARGO_MANIFEST_DIR`). In looking at the `std::file!` use case, `CARGO_MANIFEST_DIR`, no matter how we defined it, would only sort of work because no sane definition of that maps to `rustc`'s `current_dir`.a This instead focuses on the mechanism currently being used. - Using "current dir" in the name is meant to be consistent with `std::env::current_dir`. - I can go either way on `CARGO_RUSTC` vs `RUSTC`. Existing related variables: - `RUSTC` - `RUSTC_WRAPPER` - `RUSTC_WORKSPACE_WRAPPER` - `RUSTFLAGS` (no `C`) - `CARGO_CACHE_RUSTC_INFO` Note that rust-lang#3946 was overly broad and covered many use cases. One of those was for packages to look up information on their dependents. Issue rust-lang#13484 is being left open to track that. Fixes rust-lang#3946
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-cli-help
Area: built-in command-line help
A-infrastructure
Area: infrastructure around the cargo repo, ci, releases, etc.
A-testing-cargo-itself
Area: cargo's tests
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
No description provided.