Skip to content

Support for Cabal >= 3.14#25

Merged
sternenseemann merged 3 commits intomasterfrom
Cabal-3.14
Jan 2, 2025
Merged

Support for Cabal >= 3.14#25
sternenseemann merged 3 commits intomasterfrom
Cabal-3.14

Conversation

@sternenseemann
Copy link
Member

No description provided.

@sternenseemann
Copy link
Member Author

I've revised 1.4 to forbid Cabal >= 3.14.

This will ease adding CPP directives for Cabal 3.14 compatibility.
readGenericPackageDescription now uses interpretSymbolicPath internally
[1] which allows for passing in a CWD directory explicitly rather than
just inheriting it from the running process.

We want to preserve the old behavior and behave the same as
writeGenericPackageDescription which does not use interpretSymbolicPath,
so we pass Nothing. This amounts to the same behavior as just returning
the underlying path (which is what we had before) [2] [3].

This also seems safer since readGenericPackageDescription seems to
assume that the passed in CWD directory matches the process working
directory [1].

[1]: https://github.com/haskell/cabal/blob/Cabal-v3.14.1.0/Cabal/src/Distribution/Simple/PackageDescription.hs#L83-L84
[2]: https://github.com/haskell/cabal/blob/Cabal-v3.14.1.0/Cabal-syntax/src/Distribution/Utils/Path.hs#L288-L305
[3]: https://github.com/haskell/cabal/blob/Cabal-v3.14.1.0/Cabal-syntax/src/Distribution/Utils/Path.hs#L257-L259
@sternenseemann sternenseemann merged commit 8d1a5aa into master Jan 2, 2025
@sternenseemann sternenseemann deleted the Cabal-3.14 branch January 2, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants