Consider already selected packages during solve #1406
Draft
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.
We ran into a very very slow solve. I can't tell if it was actually slow or infinite, but it didn't seem to be convering very quickly. I realized that we essentially recurse the entire graph for every constraint, even for things we've already solved. This was surprising, because I thought we handled that already, but it seems like we didn't.
A major concern I have for this change is that I believe it affects the order of the packages we return when we solve, which might affect how the actual filesystem gets put together when we install them. This might not actually be a problem given that in other places we sort the package list when locking the apko config, which would generate a different install order, which would already be exercising my concern. So... if this is a problem, we haven't noticed it yet.