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

Allow Cabal to recognize swarm as a library. #1965

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

noahyor
Copy link
Member

@noahyor noahyor commented Jun 19, 2024

Allow Cabal to recognize swarm as a library.

Closes #1964.

@noahyor noahyor requested a review from byorgey June 19, 2024 14:13
@noahyor
Copy link
Member Author

noahyor commented Jun 19, 2024

Why is docspec failing with such a strange error message? It compiled just fine the first time through.

@xsebek
Copy link
Member

xsebek commented Jun 19, 2024

@noahyor what does this library do?

I am no wiser from the Cabal message. Did you try running Docspec yourself?

@@ -117,6 +117,9 @@ common ghc2021-extensions
TypeApplications
TypeOperators

-- Allow Cabal to recognize swarm as a library.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add a comment here with a link to the Cabal issue you found that explains why this is a necessary workaround for now.

@nitinprakash96
Copy link
Collaborator

Just out of curiosity, even if do recognize it a library this way, it wouldn't really work as a library because there no exposed modules, right?

@byorgey
Copy link
Member

byorgey commented Jun 19, 2024

No, you can import modules from the other libraries like swarm-lang that are marked as public. The point is that because of a Cabal bug it will not let you import anything at all from a package unless it has a default "main" library.

See haskell/cabal#8095 .

@byorgey
Copy link
Member

byorgey commented Jun 19, 2024

It seems like docspec does not like having an empty library component? I'm not sure...

@nitinprakash96
Copy link
Collaborator

Ah I see. Thanks a lot! I wasn't aware of that bug.

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.

Cabal does not recognize swarm as a library.
4 participants