Skip to content

Comments

Ignore inferred conflict marker when determining if lockfile is up-to-date#15884

Draft
zanieb wants to merge 3 commits intomainfrom
zb/lock-conflict-transitive
Draft

Ignore inferred conflict marker when determining if lockfile is up-to-date#15884
zanieb wants to merge 3 commits intomainfrom
zb/lock-conflict-transitive

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Sep 16, 2025

Closes #15869

@zanieb zanieb added the bug Something isn't working label Sep 16, 2025
Comment on lines 11057 to +11058
Resolved 5 packages in [TIME]
error: Groups `dev` and `magic` are incompatible with the transitively inferred conflicts: {`example:dev`, `example:magic`}
error: Groups `dev` and `magic` are incompatible with the declared conflicts: {`example:dev`, `example:magic`}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this regresses the error message, I'll need to investigate that further.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably the problem is that we're installing from the lockfile instead of a fresh resolution, which drops this information.

I think there are a few options here

  1. Read the pyproject.toml to determine if the conflict is transitive
  2. Change the encoding in the lockfile to avoid flattening nested groups
  3. Add a marker to the lockfile to indicate a transitive conflict is present
  4. Drop this special-case entirely

I sort of argue for (4), while we might want (2) or (3) in the future, they seem like a fair bit of work and the improvement in the error message is quite minor.

Comment on lines +10998 to +11005
uv_snapshot!(context.filters(), context.lock().arg("--check"), @r"
success: true
exit_code: 0
----- stdout -----

----- stderr -----
Resolved 5 packages in [TIME]
");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can see the failure from the issue in 44522f0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The uv lock --check command fails even though it should pass.

1 participant