Refactor package selection#180
Refactor package selection#180mpdude wants to merge 2 commits intocomposer:masterfrom webfactory:refactor-package-selection
Conversation
|
It looks like your work is not build on top of the latest Satis version. Github reports that the PR conflicts with master |
…nderstand and more testable.
|
Thanks, fixed. |
|
Yeah I think it's a great idea to refactor this, ideally we'd start having some tests too, if you want to work on those? |
|
Sure, will see what I can do. |
|
While we're at it – what's your minimum requirements for merging this? It happened to me quite a few times that PRs grew so big that nobody really wanted to review them anymore and they never got merged. I don't think this changes any behavior right now and we can also add tests in another PR. |
|
On satis? I don't really care about the size. But obviously smaller self contained PRs make sense if you can actually split it up in a meaningful way, but otherwise just keep going here. Only issue will be keeping it in sync with other changes. |
|
In general I'm a bit hesitant with merging something like this right now, not because of the size but because of the lack of tests. |
|
So please help on #184 so we can get the relevant (functional) tests here. |
|
Closing this due to lack of activity and conflicting state. Please do feel free to re-open and update this PR if said functionality is still desired. :-) |
I find the selectPackages() part very hard to understand or to test.
This PR attempts to break it up into smaller pieces, namely:
PackageSelectionclass which tracks the packages that are to be processedLinkResolverwhich can follow dependencies from the currentPackageSelectionand add more packages if neededLinkProvidersthat know which dependencies to follow for a given packageFilteredPackageSelectionwhich helps in the case of "filtered builds".Feedback is welcome, but please let's try to focus on fundamental issues before discussing CS glitches.
Thanks!