cargo-detect-package 1.0.16

A Cargo tool to detect the package that a file belongs to, passing the package name to a subcommand
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Agent notes for cargo-detect-package

## When `#[serial]` is required on tests

Tests in `workspace::tests` that depend on the process-global current working directory must be
marked `#[serial]` from the `serial_test` crate. This includes:

* Tests that explicitly call `std::env::set_current_dir` (obvious).
* Tests that **implicitly** depend on the current directory being inside a Cargo workspace. For
  example, `validate_workspace_context_nonexistent_file` does not change the directory itself but
  calls `validate_workspace_context`, which internally calls `current_dir()` and then
  `find_workspace_root()`. If a concurrent test has changed the working directory to a location
  outside any workspace, `find_workspace_root` fails with a different error than expected, causing
  the test to flake.

The rule is simple: if a test calls any function that reads or writes the process current directory,
it must be `#[serial]`.