Support new Cabal library in Setup.hs (3.12, 3.14, 3.16) #82
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.
Cabalis a dependency of Setup.hs.No work was needed for 3.12 and 3.16 (just up the version bound). The interesting part is Cabal 3.14, which re-did the typing for paths in Cabal (haskell/cabal#9718) and as a result, since our Setup.hs does a bunch of stuff with paths, required quite a few changes.
I tried to localise the version differences in an API shim at the bottom of Setup.hs, to avoid introducing a very large number of CPP conditionals throughout the file. I'm open to other approaches.
Tested with Cabal 3.10, 3.12, 3.14, 3.16. @tmcdonell If you don't have time to review I'm also happy to merge as-is, but I wanted to give you the opportunity to have a look.