uv icon indicating copy to clipboard operation
uv copied to clipboard

Avoid early error for transistive constraints

Open charliermarsh opened this issue 1 year ago • 7 comments

Summary

If a constraint causes some requirement in a dependency to yield the empty set, we should avoid early termination. (I believe we do this right now because the error messages are better.) This is different than if you have (e.g.) two direct requirements with conflicting versions, which should error immediately.

Closes https://github.com/astral-sh/uv/issues/1522.

charliermarsh avatar Feb 18 '24 02:02 charliermarsh

@zanieb - I think this is the thing that would've been solved by that PR you had at one point to allow returning multiple versions (i.e., to avoid this eager merging).

charliermarsh avatar Feb 18 '24 02:02 charliermarsh

I'm not sure which one you're referring to anymore :)

zanieb avatar Feb 18 '24 07:02 zanieb

@zanieb - Found it! https://github.com/astral-sh/uv/pull/383

charliermarsh avatar Feb 18 '24 12:02 charliermarsh

Oh gosh we probably still want that don't we... 😭

zanieb avatar Feb 18 '24 21:02 zanieb

Yeah I think it would indirectly solve this problem

charliermarsh avatar Feb 18 '24 21:02 charliermarsh

(Like in theory it would make this PR redundant and avoid the bad error message I commented on in the PR.)

charliermarsh avatar Feb 18 '24 21:02 charliermarsh

I think the main blocker there was the URL dependency stuff and I think you had a better solution for that than me? Maybe you should take a look at it?

zanieb avatar Feb 18 '24 21:02 zanieb

@zanieb - Yeah I can take this on. I have to prioritize some other things over it first. Do you think this is worth merging as-is even with the bad error message? Defer to you on that.

charliermarsh avatar Feb 19 '24 18:02 charliermarsh

Closing in favor of https://github.com/astral-sh/uv/pull/1796.

charliermarsh avatar Feb 21 '24 18:02 charliermarsh