active-repositories: Don't override fully-deprecated packages#11760
active-repositories: Don't override fully-deprecated packages#11760erikd wants to merge 1 commit intohaskell:masterfrom
Conversation
38c15e5 to
c257e5a
Compare
c257e5a to
b5a6079
Compare
|
Tagging @andreabedini because he had some comments on Alexanders original PR. @Mikolaj In July last year you asked if Alexander's PR could be moved forward. As I stated at the top, I have taken this over after Alexander passed. |
Oh, I didn't now about Alexander. I'm honoured to help carry onward his work. Let me also mark @geekosaur, who reviewed the original PR. @erikd, please don't forget to set the needs-review label as soon as you'd like to widen the pool of reviewers. |
|
An initial technical question: does the test have the property that it fails without the PR and succeeds with it? I assume the tests from #11684 don't have this property and so they just check this PR doesn't break how active-repositories should work, right? |
|
@Mikolaj If I back out some of the changes in Otherwise, yes, the tests in #11684 were just to test the "active-repositories" features so that these changes did not break that functionality. |
|
Good to know. Are the failing tests the newly added overrideOrMergeTests and/or deprecationAwareStrategyTests? |
b5a6079 to
02f4672
Compare
|
Inspecting the failures more closely, they are a) intermittent and b) not related to the changes in this PR. For some reason a couple of tests in the I did some further refactoring to expose There are still separate tests for Rebased against |
02f4672 to
71dde16
Compare
e167474 to
689e85c
Compare
When active-repositories includes a repo with :override, and that repo's preferred-versions marks all its versions of a package as deprecated, the index-combining step previously still applied full override semantics, hiding all versions of that package from earlier repos. Fix by consulting preferred-versions when combining indexes: if lookupDependency finds no preferred version for a package in the override repo, fall back to merge semantics so earlier-repo versions remain visible. Two changes: - PackageIndex: add overrideOrMerge, a per-package Override/Merge strategy - IndexUtils: add deprecationAwareStrategy, wired into getSourcePackagesAtIndexState Fixes haskell#8502 This code was originally authored by Alexander Esgen and sumbitted in a PR over 2 years ago. Erik manually rebased that code onto master and used Claude to add tests and do some very minor refactoring to Alexander's code to make it more testable. Co-Authored-By: Erik de Castro Lopo <erikd@mega-nerd.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
689e85c to
2924f25
Compare
This PR takes over #8997 from the original author Alexander Esgen who unfortunately passed away late last year.
The PR includes tests and additions to the documentation.
When active-repositories includes a repo with :override, and that repo's preferred-versions marks all its versions of a package as deprecated, the index-combining step previously still applied full override semantics, hiding all versions of that package from earlier repos.
Fix by consulting preferred-versions when combining indexes: if lookupDependency finds no preferred version for a package in the override repo, fall back to merge semantics so earlier-repo versions remain visible.
Two changes:
Fixes #8502
This code was originally authored by Alexander Esgen and sumbitted in a PR over 2 years ago. Erik manually rebased that code onto master and used Claude to add tests and do some very minor refactoring to Alexander's code to make it more testable.
Please read Github PR Conventions and then fill in one of these two templates.
Include the following checklist in your PR:
significance: significantin the changelog file.