feat(test-support): Use test name for dir when running tests#16121
feat(test-support): Use test name for dir when running tests#16121ehuss merged 1 commit intorust-lang:masterfrom
Conversation
There was a problem hiding this comment.
I'd like to call out @ehuss's comment #11738 (comment), though personally fine with this PR.
There was a problem hiding this comment.
Not sure how I missed this when I was going back through that PR. Given that concern, it might make sense for me to bring this up in the next team meeting.
|
There is some documentation in https://github.com/rust-lang/cargo/blob/HEAD/src/doc/contrib/src/tests/writing.md that would need to be updated. |
8f90edd to
cbdfb3e
Compare
This comment has been minimized.
This comment has been minimized.
cbdfb3e to
860241e
Compare
860241e to
3f47330
Compare
This comment has been minimized.
This comment has been minimized.
|
@Muscraft Is this ready? |
|
Yes it's ready, I just forgot to mark it as such @rustbot ready |
This comment has been minimized.
This comment has been minimized.
crates/cargo-test-macro/src/lib.rs
Outdated
| let mut new_body = if cfg!(windows) { | ||
| to_token_stream( | ||
| r#"let _test_guard = { | ||
| let tmp_dir = option_env!("CARGO_TARGET_TMPDIR"); | ||
| cargo_test_support::paths::init_root(tmp_dir) | ||
| };"#, | ||
| ) | ||
| } else { | ||
| to_token_stream(&format!( | ||
| r#"let _test_guard = {{ | ||
| let tmp_dir = option_env!("CARGO_TARGET_TMPDIR"); | ||
| let test_dir = cargo_test_support::paths::test_dir(std::file!(), "{name}"); | ||
| cargo_test_support::paths::init_root(tmp_dir, test_dir) | ||
| }};"# | ||
| )) | ||
| }; |
There was a problem hiding this comment.
With an eye towards reducing the amount of duplicated code, I'm wondering if we can try to combine things a little more. So, for example, this could be:
| let mut new_body = if cfg!(windows) { | |
| to_token_stream( | |
| r#"let _test_guard = { | |
| let tmp_dir = option_env!("CARGO_TARGET_TMPDIR"); | |
| cargo_test_support::paths::init_root(tmp_dir) | |
| };"#, | |
| ) | |
| } else { | |
| to_token_stream(&format!( | |
| r#"let _test_guard = {{ | |
| let tmp_dir = option_env!("CARGO_TARGET_TMPDIR"); | |
| let test_dir = cargo_test_support::paths::test_dir(std::file!(), "{name}"); | |
| cargo_test_support::paths::init_root(tmp_dir, test_dir) | |
| }};"# | |
| )) | |
| }; | |
| let mut new_body = to_token_stream(&format!( | |
| r#"let _test_guard = {{ | |
| let tmp_dir = option_env!("CARGO_TARGET_TMPDIR"); | |
| let test_dir = cargo_test_support::paths::test_dir(std::file!(), "{name}"); | |
| cargo_test_support::paths::init_root(tmp_dir, test_dir) | |
| }};"# | |
| )); |
| #[cfg(windows)] | ||
| static TEST_ID: RefCell<Option<usize>> = const { RefCell::new(None) }; | ||
| #[cfg(not(windows))] | ||
| static TEST_NAME: RefCell<Option<PathBuf>> = const { RefCell::new(None) }; |
There was a problem hiding this comment.
Part 2 of merging. Also, changing the name of TEST_NAME to TEST_DIR, since it doesn't include just the test name, but the full path. That was a little confusing to me.
| #[cfg(windows)] | |
| static TEST_ID: RefCell<Option<usize>> = const { RefCell::new(None) }; | |
| #[cfg(not(windows))] | |
| static TEST_NAME: RefCell<Option<PathBuf>> = const { RefCell::new(None) }; | |
| static TEST_ID: RefCell<Option<usize>> = const { RefCell::new(None) }; | |
| static TEST_DIR: RefCell<Option<PathBuf>> = const { RefCell::new(None) }; |
| #[cfg(windows)] | ||
| pub fn init_root(tmp_dir: Option<&'static str>) -> TestIdGuard { | ||
| static NEXT_ID: AtomicUsize = AtomicUsize::new(0); | ||
|
|
||
| let id = NEXT_ID.fetch_add(1, Ordering::SeqCst); | ||
| TEST_ID.with(|n| *n.borrow_mut() = Some(id)); | ||
| let guard = TestIdGuard { _private: () }; | ||
|
|
||
| set_global_root(tmp_dir); | ||
| let r = root(); | ||
| r.rm_rf(); | ||
| r.mkdir_p(); | ||
|
|
||
| guard | ||
| } | ||
|
|
||
| /// For test harnesses like [`crate::cargo_test`] | ||
| #[cfg(not(windows))] | ||
| pub fn init_root(tmp_dir: Option<&'static str>, test_name: PathBuf) -> TestIdGuard { | ||
| static NEXT_ID: AtomicUsize = AtomicUsize::new(0); | ||
| let id = NEXT_ID.fetch_add(1, Ordering::SeqCst); | ||
|
|
||
| TEST_NAME.with(|n| *n.borrow_mut() = Some(test_name)); | ||
| let guard = TestIdGuard { _private: () }; | ||
|
|
||
| set_global_root(tmp_dir); | ||
| let r = root(); | ||
| r.rm_rf(); | ||
| r.mkdir_p(); | ||
| if id == 0 { | ||
| use crate::SymlinkBuilder; | ||
|
|
||
| let mut root = global_root(); | ||
| root.push(&format!("t{}", id)); | ||
| root.rm_rf(); | ||
| SymlinkBuilder::new_dir(r, root).mk(); | ||
| } | ||
| guard | ||
| } |
There was a problem hiding this comment.
Part 3 of merge. Most of the platform-specific behavior would be here.
Part of the change here is that TEST_DIR now has the same behavior on both platforms where it represents the (relative) path of the test directory.
This also adds a comment that explains what the symlink is doing.
| #[cfg(windows)] | |
| pub fn init_root(tmp_dir: Option<&'static str>) -> TestIdGuard { | |
| static NEXT_ID: AtomicUsize = AtomicUsize::new(0); | |
| let id = NEXT_ID.fetch_add(1, Ordering::SeqCst); | |
| TEST_ID.with(|n| *n.borrow_mut() = Some(id)); | |
| let guard = TestIdGuard { _private: () }; | |
| set_global_root(tmp_dir); | |
| let r = root(); | |
| r.rm_rf(); | |
| r.mkdir_p(); | |
| guard | |
| } | |
| /// For test harnesses like [`crate::cargo_test`] | |
| #[cfg(not(windows))] | |
| pub fn init_root(tmp_dir: Option<&'static str>, test_name: PathBuf) -> TestIdGuard { | |
| static NEXT_ID: AtomicUsize = AtomicUsize::new(0); | |
| let id = NEXT_ID.fetch_add(1, Ordering::SeqCst); | |
| TEST_NAME.with(|n| *n.borrow_mut() = Some(test_name)); | |
| let guard = TestIdGuard { _private: () }; | |
| set_global_root(tmp_dir); | |
| let r = root(); | |
| r.rm_rf(); | |
| r.mkdir_p(); | |
| if id == 0 { | |
| use crate::SymlinkBuilder; | |
| let mut root = global_root(); | |
| root.push(&format!("t{}", id)); | |
| root.rm_rf(); | |
| SymlinkBuilder::new_dir(r, root).mk(); | |
| } | |
| guard | |
| } | |
| pub fn init_root(tmp_dir: Option<&'static str>, test_dir: PathBuf) -> TestIdGuard { | |
| static NEXT_ID: AtomicUsize = AtomicUsize::new(0); | |
| let id = NEXT_ID.fetch_add(1, Ordering::SeqCst); | |
| TEST_ID.with(|n| *n.borrow_mut() = Some(id)); | |
| if cfg!(windows) { | |
| // Due to path-length limits, Windows doesn't use the full test name. | |
| TEST_DIR.with(|n| *n.borrow_mut() = Some(PathBuf::from(format!("t{id}")))); | |
| } else { | |
| TEST_DIR.with(|n| *n.borrow_mut() = Some(test_dir)); | |
| } | |
| let guard = TestIdGuard { _private: () }; | |
| set_global_root(tmp_dir); | |
| let r = root(); | |
| r.rm_rf(); | |
| r.mkdir_p(); | |
| #[cfg(not(windows))] | |
| if id == 0 { | |
| // Create a symlink from `t0` to the first test to make it easier to | |
| // find and reuse when running a single test. | |
| use crate::SymlinkBuilder; | |
| let mut alias = global_root(); | |
| alias.push("t0"); | |
| alias.rm_rf(); | |
| SymlinkBuilder::new_dir(r, alias).mk(); | |
| } | |
| guard | |
| } |
| #[cfg(windows)] | ||
| TEST_ID.with(|n| *n.borrow_mut() = None); | ||
| #[cfg(not(windows))] | ||
| TEST_NAME.with(|n| *n.borrow_mut() = None); |
There was a problem hiding this comment.
Part 4 of removing the platform-specific code.
| #[cfg(windows)] | |
| TEST_ID.with(|n| *n.borrow_mut() = None); | |
| #[cfg(not(windows))] | |
| TEST_NAME.with(|n| *n.borrow_mut() = None); | |
| TEST_ID.with(|n| *n.borrow_mut() = None); | |
| TEST_DIR.with(|n| *n.borrow_mut() = None); |
| @@ -118,6 +145,23 @@ pub fn root() -> PathBuf { | |||
| root | |||
| } | |||
|
|
|||
| /// Path to the test's filesystem scratchpad | |||
| /// | |||
| /// ex: `$CARGO_TARGET_TMPDIR/cit/t0` | |||
| #[cfg(not(windows))] | |||
| pub fn root() -> PathBuf { | |||
| let test_name = TEST_NAME.with(|n| { | |||
| n.borrow().clone().expect( | |||
| "Tests must use the `#[cargo_test]` attribute in \ | |||
| order to be able to use the crate root.", | |||
| ) | |||
| }); | |||
|
|
|||
| let mut root = global_root(); | |||
| root.push(&test_name); | |||
| root | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
Part 5 of removing the platform-specific code.
This also updates the doc-comment to mention both forms.
| /// Path to the test's filesystem scratchpad | |
| /// | |
| /// ex: `$CARGO_TARGET_TMPDIR/cit/<integration test>/<module>/<fn name>/` | |
| /// or `$CARGO_TARGET_TMPDIR/cit/t0` on Windows | |
| pub fn root() -> PathBuf { | |
| let test_dir = TEST_DIR.with(|n| { | |
| n.borrow().clone().expect( | |
| "Tests must use the `#[cargo_test]` attribute in \ | |
| order to be able to use the crate root.", | |
| ) | |
| }); | |
| let mut root = global_root(); | |
| root.push(&test_dir); | |
| root | |
| } | |
src/doc/contrib/src/tests/writing.md
Outdated
There was a problem hiding this comment.
A very minor nit. The previous text was written with an eye towards the test directory names being sequentially numbered.
| 1. The first test's sandbox directory is called `t0`. |
3f47330 to
ee03c3c
Compare
This comment has been minimized.
This comment has been minimized.
| --> Cargo.toml:7:[..] | ||
| | | ||
| 7 | bar = { git = '[ROOTURL]/bar', version = "0.1" } | ||
| 7 | ...git_dep_with_registry_version/bar', version = "0.1" } |
There was a problem hiding this comment.
It looks like this change runs into annotate-snippets's automatic trimming of long lines. I hadn't considered that long test paths could run into it.
Ideally, we would just increase the term width for this test, but cargo currently sets the term width via auto-detection (defaulting to 140, IIRC). I could add support for configuring the term width, but that seems like something that would require a larger discussion.
There was a problem hiding this comment.
It makes sense to me to have a larger width by default and override when needed for Cargo tests. Otherwise it would be a bit painful when updating the Cargo submodule in rust-lang/rust
There was a problem hiding this comment.
There's still a problem here, even with #16403. I tried running the tests in rust-lang/rust, and got an error with implicit_minimum_version_req. You can check this with something like the following (replace the target dir appropriately):
CARGO_TARGET_DIR=/Users/eric/Temp/build/aarch64-apple-darwin/stage2-tools cargo test --test testsuite --target host-tuple -- implicit_minimum_version_reqI recommend raising __CARGO_TEST_TTY_WIDTH_DO_NOT_USE_THIS to 400. Or 1000. Something that we are confident won't be a problem.
There was a problem hiding this comment.
I set this to 400 like you recommended and added a comment mentioning that path lengths can exceed 200 chars when Cargo's tests get ran in rust-lang/rust
This comment has been minimized.
This comment has been minimized.
ee03c3c to
f19812b
Compare
This comment has been minimized.
This comment has been minimized.
f19812b to
b5fa5b0
Compare
This comment has been minimized.
This comment has been minimized.
b5fa5b0 to
bb76475
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
bb76475 to
89e1350
Compare
Update cargo submodule 19 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..623444427f04292f3a3c7eac560cfa65ba0bb88e 2025-12-26 19:39:15 +0000 to 2026-01-06 21:05:05 +0000 - docs(unstable): expand docs for `-Zbuild-analysis` (rust-lang/cargo#16476) - test: add `-Zunstable-options` with custom targets (rust-lang/cargo#16467) - feat(report): add cargo report rebuilds (rust-lang/cargo#16456) - feat(test-support): Use test name for dir when running tests (rust-lang/cargo#16121) - refactor: Migrate some cases to expect/reason (rust-lang/cargo#16461) - docs(build-script): clarify OUT_DIR is not cleaned between builds (rust-lang/cargo#16437) - chore: Update dependencies (rust-lang/cargo#16460) - Update handlebars to 6.4.0 (rust-lang/cargo#16457) - chore(deps): update alpine docker tag to v3.23 (rust-lang/cargo#16454) - Any build scripts can now use cargo::metadata=KEY=VALUE (rust-lang/cargo#16436) - fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448) - Implement fine grain locking for `build-dir` (rust-lang/cargo#16155) - feat(resolver): List features when no close match (rust-lang/cargo#16445) - feat(report): new command `cargo report sessions` (rust-lang/cargo#16428) - feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407) - test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444) - feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415) - feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441) - fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439) r? ghost
Update cargo submodule 24 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..fc4c92b64d1e0046b66cbdc747cc1c17af8b35a0 2025-12-26 19:39:15 +0000 to 2026-01-08 06:54:56 +0000 - Fixed incorrect version comparision during build script dependency selection (rust-lang/cargo#16486) - refactor: new type for unit index (rust-lang/cargo#16485) - feat(test): Make CARGO_BIN_EXE_ available at runtime (rust-lang/cargo#16421) - fix(package): detect dirty files when run from workspace member (rust-lang/cargo#16479) - fix(timing)!: remove `--timings=<FMT>` optional format values (rust-lang/cargo#16420) - docs(unstable): expand docs for `-Zbuild-analysis` (rust-lang/cargo#16476) - test: add `-Zunstable-options` with custom targets (rust-lang/cargo#16467) - feat(report): add cargo report rebuilds (rust-lang/cargo#16456) - feat(test-support): Use test name for dir when running tests (rust-lang/cargo#16121) - refactor: Migrate some cases to expect/reason (rust-lang/cargo#16461) - docs(build-script): clarify OUT_DIR is not cleaned between builds (rust-lang/cargo#16437) - chore: Update dependencies (rust-lang/cargo#16460) - Update handlebars to 6.4.0 (rust-lang/cargo#16457) - chore(deps): update alpine docker tag to v3.23 (rust-lang/cargo#16454) - Any build scripts can now use cargo::metadata=KEY=VALUE (rust-lang/cargo#16436) - fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448) - Implement fine grain locking for `build-dir` (rust-lang/cargo#16155) - feat(resolver): List features when no close match (rust-lang/cargo#16445) - feat(report): new command `cargo report sessions` (rust-lang/cargo#16428) - feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407) - test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444) - feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415) - feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441) - fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439)
Update cargo submodule 27 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..8c133afcd5e0d69932fe11f5907683723f8d361d 2025-12-26 19:39:15 +0000 to 2026-01-09 03:50:15 +0000 - Isolate build script metadata progation between std and non-std crates (rust-lang/cargo#16489) - Add Clippy like lint groups (rust-lang/cargo#16464) - feat: in-memory only `Manifest` (rust-lang/cargo#16409) - Fixed incorrect version comparision during build script dependency selection (rust-lang/cargo#16486) - refactor: new type for unit index (rust-lang/cargo#16485) - feat(test): Make CARGO_BIN_EXE_ available at runtime (rust-lang/cargo#16421) - fix(package): detect dirty files when run from workspace member (rust-lang/cargo#16479) - fix(timing)!: remove `--timings=<FMT>` optional format values (rust-lang/cargo#16420) - docs(unstable): expand docs for `-Zbuild-analysis` (rust-lang/cargo#16476) - test: add `-Zunstable-options` with custom targets (rust-lang/cargo#16467) - feat(report): add cargo report rebuilds (rust-lang/cargo#16456) - feat(test-support): Use test name for dir when running tests (rust-lang/cargo#16121) - refactor: Migrate some cases to expect/reason (rust-lang/cargo#16461) - docs(build-script): clarify OUT_DIR is not cleaned between builds (rust-lang/cargo#16437) - chore: Update dependencies (rust-lang/cargo#16460) - Update handlebars to 6.4.0 (rust-lang/cargo#16457) - chore(deps): update alpine docker tag to v3.23 (rust-lang/cargo#16454) - Any build scripts can now use cargo::metadata=KEY=VALUE (rust-lang/cargo#16436) - fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448) - Implement fine grain locking for `build-dir` (rust-lang/cargo#16155) - feat(resolver): List features when no close match (rust-lang/cargo#16445) - feat(report): new command `cargo report sessions` (rust-lang/cargo#16428) - feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407) - test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444) - feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415) - feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441) - fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439)
Update cargo submodule 27 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..8c133afcd5e0d69932fe11f5907683723f8d361d 2025-12-26 19:39:15 +0000 to 2026-01-09 03:50:15 +0000 - Isolate build script metadata progation between std and non-std crates (rust-lang/cargo#16489) - Add Clippy like lint groups (rust-lang/cargo#16464) - feat: in-memory only `Manifest` (rust-lang/cargo#16409) - Fixed incorrect version comparision during build script dependency selection (rust-lang/cargo#16486) - refactor: new type for unit index (rust-lang/cargo#16485) - feat(test): Make CARGO_BIN_EXE_ available at runtime (rust-lang/cargo#16421) - fix(package): detect dirty files when run from workspace member (rust-lang/cargo#16479) - fix(timing)!: remove `--timings=<FMT>` optional format values (rust-lang/cargo#16420) - docs(unstable): expand docs for `-Zbuild-analysis` (rust-lang/cargo#16476) - test: add `-Zunstable-options` with custom targets (rust-lang/cargo#16467) - feat(report): add cargo report rebuilds (rust-lang/cargo#16456) - feat(test-support): Use test name for dir when running tests (rust-lang/cargo#16121) - refactor: Migrate some cases to expect/reason (rust-lang/cargo#16461) - docs(build-script): clarify OUT_DIR is not cleaned between builds (rust-lang/cargo#16437) - chore: Update dependencies (rust-lang/cargo#16460) - Update handlebars to 6.4.0 (rust-lang/cargo#16457) - chore(deps): update alpine docker tag to v3.23 (rust-lang/cargo#16454) - Any build scripts can now use cargo::metadata=KEY=VALUE (rust-lang/cargo#16436) - fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448) - Implement fine grain locking for `build-dir` (rust-lang/cargo#16155) - feat(resolver): List features when no close match (rust-lang/cargo#16445) - feat(report): new command `cargo report sessions` (rust-lang/cargo#16428) - feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407) - test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444) - feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415) - feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441) - fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439)
Update cargo submodule 27 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..8c133afcd5e0d69932fe11f5907683723f8d361d 2025-12-26 19:39:15 +0000 to 2026-01-09 03:50:15 +0000 - Isolate build script metadata progation between std and non-std crates (rust-lang/cargo#16489) - Add Clippy like lint groups (rust-lang/cargo#16464) - feat: in-memory only `Manifest` (rust-lang/cargo#16409) - Fixed incorrect version comparision during build script dependency selection (rust-lang/cargo#16486) - refactor: new type for unit index (rust-lang/cargo#16485) - feat(test): Make CARGO_BIN_EXE_ available at runtime (rust-lang/cargo#16421) - fix(package): detect dirty files when run from workspace member (rust-lang/cargo#16479) - fix(timing)!: remove `--timings=<FMT>` optional format values (rust-lang/cargo#16420) - docs(unstable): expand docs for `-Zbuild-analysis` (rust-lang/cargo#16476) - test: add `-Zunstable-options` with custom targets (rust-lang/cargo#16467) - feat(report): add cargo report rebuilds (rust-lang/cargo#16456) - feat(test-support): Use test name for dir when running tests (rust-lang/cargo#16121) - refactor: Migrate some cases to expect/reason (rust-lang/cargo#16461) - docs(build-script): clarify OUT_DIR is not cleaned between builds (rust-lang/cargo#16437) - chore: Update dependencies (rust-lang/cargo#16460) - Update handlebars to 6.4.0 (rust-lang/cargo#16457) - chore(deps): update alpine docker tag to v3.23 (rust-lang/cargo#16454) - Any build scripts can now use cargo::metadata=KEY=VALUE (rust-lang/cargo#16436) - fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448) - Implement fine grain locking for `build-dir` (rust-lang/cargo#16155) - feat(resolver): List features when no close match (rust-lang/cargo#16445) - feat(report): new command `cargo report sessions` (rust-lang/cargo#16428) - feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407) - test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444) - feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415) - feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441) - fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439)
Update cargo submodule 27 commits in 94c368ad2b9db0f0da5bdd8421cea13786ce4412..8c133afcd5e0d69932fe11f5907683723f8d361d 2025-12-26 19:39:15 +0000 to 2026-01-09 03:50:15 +0000 - Isolate build script metadata progation between std and non-std crates (rust-lang/cargo#16489) - Add Clippy like lint groups (rust-lang/cargo#16464) - feat: in-memory only `Manifest` (rust-lang/cargo#16409) - Fixed incorrect version comparision during build script dependency selection (rust-lang/cargo#16486) - refactor: new type for unit index (rust-lang/cargo#16485) - feat(test): Make CARGO_BIN_EXE_ available at runtime (rust-lang/cargo#16421) - fix(package): detect dirty files when run from workspace member (rust-lang/cargo#16479) - fix(timing)!: remove `--timings=<FMT>` optional format values (rust-lang/cargo#16420) - docs(unstable): expand docs for `-Zbuild-analysis` (rust-lang/cargo#16476) - test: add `-Zunstable-options` with custom targets (rust-lang/cargo#16467) - feat(report): add cargo report rebuilds (rust-lang/cargo#16456) - feat(test-support): Use test name for dir when running tests (rust-lang/cargo#16121) - refactor: Migrate some cases to expect/reason (rust-lang/cargo#16461) - docs(build-script): clarify OUT_DIR is not cleaned between builds (rust-lang/cargo#16437) - chore: Update dependencies (rust-lang/cargo#16460) - Update handlebars to 6.4.0 (rust-lang/cargo#16457) - chore(deps): update alpine docker tag to v3.23 (rust-lang/cargo#16454) - Any build scripts can now use cargo::metadata=KEY=VALUE (rust-lang/cargo#16436) - fix(log): add `dependencies` field to `UnitRegistered` (rust-lang/cargo#16448) - Implement fine grain locking for `build-dir` (rust-lang/cargo#16155) - feat(resolver): List features when no close match (rust-lang/cargo#16445) - feat(report): new command `cargo report sessions` (rust-lang/cargo#16428) - feat (patch): Display where the patch was defined in patch-related error messages (rust-lang/cargo#16407) - test(build-rs): Reduce from 'build' to 'check' where possible (rust-lang/cargo#16444) - feat(toml): TOML 1.1 parse support (rust-lang/cargo#16415) - feat(report): support --manifest-path in `cargo report timings` (rust-lang/cargo#16441) - fix(vendor): recursively filter git files in subdirectories (rust-lang/cargo#16439)
In #11738, I made a test's "sandbox" folder based on its name instead of a generated number, which can change from run to run. #11812 reverted this change due to problems with path length limits on Windows. After getting frustrated with the generated folders while trying to debug a test recently, I decided that it would be a good idea to bring back name-based folders to platforms that support them.