-
Notifications
You must be signed in to change notification settings - Fork 360
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
setup: Don't assume exe is built on --lib #7471
Conversation
3f43f32
to
264886c
Compare
The changes here are unfortunately not visible on our CI ---supposedly because Without it, Setup prints:
With the PR, this part is no longer printed. |
Thanks for double checking. This is also what I observed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thanks for lending your expertise!
Cabal-3.12 introduces a breaking change which broke `cabal install --lib Agda`. The reason is that previously, Cabal, for a Custom-build-type package, would /always/ build the executable, even if only the library was requested, and Agda's Setup.hs copyHook expects the executable to /always/ be available to compile the Agda standard lib. Now, Cabal won't build the executable if it is not required, so Agda's assumption will cause a crash when the executable isn't built. The fix is simple: don't try to compile the Agda standard library if only the Agda Haskell library was requested, since only when installing the executable does the agda standard library need to be installed. Co-authored-by: @sheaf Co-authored-by: @andreasabel
Cherry-picked for 2.7.0.1. |
Cabal-3.12 introduces a breaking change which broke
cabal install --lib Agda
.The reason is that previously, Cabal, for a Custom-build-type package, would /always/ build the executable, even if only the library was requested, and Agda's Setup.hs copyHook expects the executable to /always/ be available to compile the Agda standard lib. Now, Cabal won't build the executable if it is not required, so Agda's assumption will cause a crash when the executable isn't built.
The fix is simple: don't try to compile the Agda standard library if only the Agda Haskell library was requested, since only when installing the executable does the agda standard library need to be installed.
Co-authored-by: @sheaf