Allow minor Cabal version bumps without recompiling - #12289
Conversation
We now don't store the specific Cabal library version used to provide the Setup CLI, which allows us to re-use an install plan made with another Cabal library version that is still compatible (e.g. across a minor version bump). Fixes haskell#11416
Mikolaj
left a comment
There was a problem hiding this comment.
Thank you. Please set the merge_me label.
andreasabel
left a comment
There was a problem hiding this comment.
I have been asked to review this PR since I reported the issue.
I am not familiar with the internal workings of Cabal so I cannot comment on the implementation of the solution.
What I could do here is to verify that the test case covers the issue.
But there is no test case included here.
The problem is that reproducing involves building a package with two different versions of |
That's fine. Asking for a new test framework that would cover such cases would be feature creep. So we have to confine ourselves anecdotal testing here (which I trust you have performed). |
Yes, those are QA notes. Is it feasible to add them? That way, other cabal devs could test on their enviroment. |
I added QA notes to the OP. Please let me know if what I wrote isn't sufficient. |
|
Many thanks! I ran your instructions and indeed it does not choke as in #11416. Sadly, this cannot be backported to |
|
@sheaf: Or maybe there's a way to fix this without breaking the API? |
Fundamentally the issue is that, without this patch, It would be possible to continue to write this information to disk but have some logic to carefully ignore it but that seems worse in terms of maintainability. Given that this is not a regression I don't think it's a huge problem that the fix does not get backported. |
Merge Queue Status
This pull request spent 1 hour 46 minutes 27 seconds in the queue, including 1 hour 34 minutes 55 seconds running CI. Required conditions to merge
|
Fix for #11416: we now don't store the specific Cabal library version used to provide the Setup CLI, which allows us to re-use an install plan made with another Cabal library version that is still compatible (e.g. across a minor version bump).
No test, as this requires building with two different versions of
cabal-installin CI a minor version apart, which seems tricky to achieve. I checked locally and the change does fix the reported reproducer.Template Α: This PR modifies behaviour or interface
QA notes
We want to ensure that we can do a build, then do a minor version change to
cabal-install, then build again, without the error in #11416 and also without recompilation.Manual QA steps:
build-type: Simplewhich has a testsuite component. Any package at all will do.cabal testfor this package, with thecabal-installbuilt with this patch.cabal-installand itsCaballibrary and rebuildcabal-install.cabal test: it should succeed and not cause recompilation.