Repository navigation
Conversation
540d6f2 to
6e43394
Compare
Merging this PR will not alter performance
|
6e43394 to
e55cc6e
Compare
e55cc6e to
d950143
Compare
d950143 to
cc515dd
Compare
cc515dd to
4c33552
Compare
| sync() | ||
| .args(["--package", "root-project"]) | ||
| .assert() | ||
| .success(); |
There was a problem hiding this comment.
[P3] Exercise the implicit-root exception with an ambiguous root
Here root-project is unambiguous, so the successful sync never reaches the new lock-error handler. The following failing sync selects split-dependency, whose name differs from the root. Removing the new lock.root() guard would therefore leave every assertion passing. Add an omitted-members fixture with two packages named root-project, including the virtual package at ., and snapshot the original ambiguity error without the workspace context. This would protect the implicit-root exception.
| let sync = || { | ||
| let mut command = context.sync(); | ||
| command.args([ | ||
| "--offline", | ||
| "--no-python-downloads", | ||
| "--frozen", | ||
| "--dry-run", |
There was a problem hiding this comment.
[P3] Keep regression command arguments explicit
This closure hides --frozen and --dry-run, the flags that determine the execution path being tested, so later assertions require tracing back to the wrapper to understand their scope. Nearby sync_frozen_member_default_groups and the new sync_frozen_ambiguous_implicit_root test put those arguments directly beside each snapshot. Use context.sync().args([...]) at each invocation so the regression conditions remain visible.
With
uv sync --frozen --package, selecting a dependency that has multiple locked versions reports an ambiguous package without explaining that it is not a workspace member. Use the lockfile’s recorded members and implicit root to add that context to this existing error, retaining the original cause. Frozen sync still works without memberpyproject.tomlfiles, and other package selections are unchanged. Fixes astral-sh#16247.