Skip to content

Scenarios with ambigious solutions with respect to the spec? #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
notatallshaw opened this issue Mar 16, 2024 · 5 comments
Closed

Scenarios with ambigious solutions with respect to the spec? #160

notatallshaw opened this issue Mar 16, 2024 · 5 comments

Comments

@notatallshaw
Copy link

This is the scenario: https://github.com/astral-sh/packse/blob/0.3.12/scenarios/prereleases.json#L320

It's listed as:

"expected": {
    "satisfiable": false,
    "explanation": "Since the user did not explicitly opt-in to a prerelease, it cannot be selected."
}

But there are many ways to interpret the spec, especially given the spec does not explicitly consider resolution. Currently pip resolves this scenario with: a==1.0.0 b==1.0.0 c==2.0.0b1.

What is packse's intent here? To set tests against the design principles of uv or against the spec?

Might it worth "expected" being a list of possible options when facing ambigious scenarios like this?

@zanieb
Copy link
Member

zanieb commented Mar 18, 2024

Yeah this is tough...

Ideally we'd test against the specification rather than uv's design principles. I'm not sure what we should do when the spec is ambiguous. Ideally the spec wouldn't be ambiguous so maybe we should propose changes.

I worry about allowing multiple expected outcomes, it sounds complicated but perhaps that's the right solution. We could also consider some sort of "feature flag" style annotation for scenarios outcome where, for example, we have two pre-release modes explicit and implicit and the scenario is tagged as such so it can be filtered out of implementations based on the mode they support.

@notatallshaw
Copy link
Author

I would be comfortable with a mode that meant something like "allow package to be marked prerelease by transitive dependency" and when False then pip wouldn't test against it.

@notatallshaw
Copy link
Author

Closing this for the same reason as this one: #171 (comment)

@zanieb
Copy link
Member

zanieb commented Jan 26, 2025

For what it's worth, I'm supportive of any work to separate the scenarios into cases where

  • The spec provides an unambiguous outcome
  • The spec allows for multiple ambiguous outcomes
  • The outcome is specific to uv

I just can't prioritize that work myself right now — maintaining and improving uv is higher impact.

@notatallshaw
Copy link
Author

100%, it needs someone outside astral to be motivated to onboard packse for it to have impact.

That might be me in the future, but not right now, and I have enough experience now that there needs to be a bigger design aim issue, rather than specific scenario issues, to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants