Skip to content

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?

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.

Other packages cannot depend on swarm-as-a-library

4 participants