Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
Pool
object implements interning but the solver doesn't care about that at all. It just needs to be able to refer to IDs and be able to call functions on theDependencyProvider
using those IDs. This PR refactors the code to remove any reference of thePool
from theSolver
. Instead, additional methods are added to theDependencyProvider
to convert the IDs (which theDependencyProvider
already provides), to strings and to filter a list of solvables with aVersionSetId
(previously implemented in theVersionSet
trait). TheDependencyProvider
trait now encapsulates everything required to implement a packaging ecosystem without requiring the use of aPool
. 📦 🍿This should make it easier to create bindings to other languages because the actual datatypes used don't even need to be stored inside
resolvo
itself. They can be kept completely externally as long as the code can provide the proper Ids.I was also able to remove loads of trait bounds through this refactor!
The
Pool
is still a useful tool for interning purposes so I kept it. Both the tests and the implementation in rattler most likely still benefit from it.This is a pretty significant refactor, which I would be happy to explain offline. 😄
TODO: