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

cabal: Add support for empty libraries #2287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iteratee
Copy link
Contributor

Previously, an empty library that only exported modules from another library failed to build. Bazel would error out when the .a file wasn't created. These libraries are becoming more common in the Haskell ecosystem, so we need to support them.

There is a straightforward way to handle these libraries. We make the package database the default output. We avoid creating an output file for any libraries if the library is marked as empty. This is all straightforward bazel dependency/output management.

Adjust the cabal wrapper to fix up the package database even in the case that there is no library. Otherwise we end up with an empty package database, which isn't what we're looking for.

Previously, an empty library that only exported modules from another
library failed to build. Bazel would error out when the .a file wasn't
created. These libraries are becoming more common in the Haskell
ecosystem, so we need to support them.

There is a straightforward way to handle these libraries. We make the
package database the default output. We avoid creating an output file
for any libraries if the library is marked as empty. This is all
straightforward bazel dependency/output management.

Adjust the cabal wrapper to fix up the package database even in the case
that there is no library. Otherwise we end up with an empty package
database, which isn't what we're looking for.
@iteratee iteratee requested a review from avdv as a code owner February 13, 2025 17:50
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.

1 participant