-
Notifications
You must be signed in to change notification settings - Fork 5
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
Track priorities in a set and allow updating from uv #42
base: main
Are you sure you want to change the base?
Conversation
This wrapper avoids accessing the `incompatibility_store` directly in uv code. Before: ```rust let dep_incompats = self.pubgrub.add_version( package.clone(), version.clone(), dependencies, ); self.pubgrub.partial_solution.add_version( package.clone(), version.clone(), dep_incompats, &self.pubgrub.incompatibility_store, ); ``` After: ```rust self.pubgrub.add_incompatibility_from_dependencies(package.clone(), version.clone(), dependencies); ``` `add_incompatibility_from_dependencies` is one of the main methods for the custom interface to pubgrub.
* Use new GitHub output syntax * Fix tag message
This is used in uv for logging
This allows discarding a previously made decision if it turned out to be a bad decision, even if all options with this decision have not yet been rejected. We allow attempting to backtrack on packages that were not decided yet to avoid the caller from making the duplicative check. astral-sh/uv#8157
CodSpeed Performance ReportCongrats! CodSpeed is installed 🎉
You will start to see performance impacts in the reports once the benchmarks are run from your default branch.
|
let current_decision_level = self.current_decision_level; | ||
self.package_assignments | ||
.get_range(self.prioritize_decision_level..) | ||
.get_range(current_decision_level.0 as usize..) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like we could directly iterate over prioritized_potential_packages
and outdated_priorities
instead of iterating over all of package_assignments
. I think this method is only used by UV, so not sure what semantics you need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use this to make prefetches, and i think currently in a kind of inefficient way. we need to emit a prefetch at least the first time we see a package, and at most when its range changes; the previous and this was good enough in profiling for now.
f58a60f
to
3fb04c3
Compare
In uv, we were updating package priorities without syncing them uv, so uv and pubgrub were getting out of sync. We couldn't previously do this because the way priority updates were done. Instead, we switch to tracking the packages whose derivations changed in a set, based on pubgrub-rs/pubgrub@dev...Eh2406:pubgrub:stop-prioritize. Since uv priorities don't depend on the ranges, we can speed this up further by not using this set in uv. In pubgrub, we can upstream this and use it as a correctness fix to also reprioritize when the conflict tracker changed, which is currently not handled.
Also exposes
into_raw
since we start using it on the uv side.