swarm-game / swarm

Resource gathering + programming game
Other
820 stars 51 forks source link

Allow Cabal to recognize swarm as a library. #1965

Open noahyor opened 1 week ago

noahyor commented 1 week ago

Allow Cabal to recognize swarm as a library.

Closes #1964.

noahyor commented 1 week ago

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

xsebek commented 1 week ago

@noahyor what does this library do?

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

nitinprakash96 commented 1 week ago

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 commented 1 week ago

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 https://github.com/haskell/cabal/issues/8095 .

byorgey commented 1 week ago

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

nitinprakash96 commented 1 week ago

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