Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Cabal >= 3.14 #25

Merged
merged 3 commits into from
Jan 2, 2025
Merged

Support for Cabal >= 3.14 #25

merged 3 commits into from
Jan 2, 2025

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
1 check failed
@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