Skip to content
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

Add DerivationTree.packages() -> HashSet<&P> #11

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Dec 8, 2023

Adds a utility to retrieve the package names for efficient lookup of versions for simplify

@zanieb zanieb changed the title Add DeriviationTree.packages -> HashSet<&P> Add DeriviationTree.packages() -> HashSet<&P> Dec 8, 2023
@zanieb zanieb marked this pull request as ready for review December 8, 2023 15:54
@zanieb zanieb changed the title Add DeriviationTree.packages() -> HashSet<&P> Add DerivationTree.packages() -> HashSet<&P> Dec 8, 2023
} else {
format!("dependencies of {package} at version {set} are unusable")
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Trying to understand this piece... Is this a bad diff? Why was this not necessary before to complete the match?

Copy link
Member Author

@zanieb zanieb Dec 8, 2023

Choose a reason for hiding this comment

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

CI on main was broken from a previous rebase which added this upstream example.

Copy link
Member Author

Choose a reason for hiding this comment

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

afab28f just fixes this problem

src/report.rs Outdated Show resolved Hide resolved
@zanieb zanieb merged commit c30acff into astral-sh:main Dec 8, 2023
5 checks passed
@zanieb zanieb deleted the zb/derivation-packages branch December 8, 2023 22:17
zanieb added a commit to astral-sh/uv that referenced this pull request Dec 12, 2023
Uses pubgrub-rs/pubgrub#156 to consolidate
version ranges in error reports using the actual available versions for
each package.

Alternative to astral-sh/pubgrub#8 which implements
this behavior as a method in the `Reporter` — here it's implemented in
our custom report formatter (#521) instead which requires no upstream
changes.

Requires astral-sh/pubgrub#11 to only retrieve the
versions for packages that will be used in the report.

This is a work in progress. Some things to do:
- ~We may want to allow lazy retrieval of the version maps from the
formatter~
- [x] We should probably create a separate error type for no solution
instead of mixing them with other resolve errors
- ~We can probably do something smarter than creating vectors to hold
the versions~
- [x] This degrades error messages when a single version is not
available, we'll need to special case that
- [x] It seems safer to coerce the error type in `resolve` instead of
`solve` if feasible
konstin pushed a commit that referenced this pull request Dec 18, 2023
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Dec 18, 2023
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
zanieb added a commit that referenced this pull request Dec 18, 2023
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Dec 28, 2023
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Jan 4, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Mar 6, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Mar 12, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Mar 12, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Mar 13, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request Mar 22, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request May 2, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request May 7, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request May 8, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
konstin pushed a commit that referenced this pull request May 21, 2024
* Add `DeriviationTree.packages -> HashSet<&P>`

* Fixup `main`

* Use FxHashSet
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

Successfully merging this pull request may close these issues.

2 participants