tomjaguarpaw / tilapia

Improving all Haskell's programmer interfaces
65 stars 2 forks source link

Cabal syntax for specifying stanza type + name #35

Open vrom911 opened 4 years ago

vrom911 commented 4 years ago

I am very confused with the syntax that should be used when I want to build/test/run specific stanza of the specific package of the project. Specifically, in the multi-package project, or in the project that has internal libraries. (The main issue when stanzas names are the same across different packages)

Moreover, Cabal and Stack's syntax seems to differ in that matter.

For example, in Stack, in order to run a test suit named test-foo from the package pac, I can express it with:

stack run pac:test:test-foo

While in Cabal:

# if there are no name collisions in different packages
cabal test:test-foo
# otherwise, should add the name of the package
cabal pac:test:test-foo
cabal pac:test-foo
# if you have cabal.project (maybe?)
cabal pac-directory:test-foo

all would work (or would they?)

At least, it is not clear how to find these docs. The syntax doesn't feel natural, so I would like to see some explanations on how to use this.

P.S. this is the great idea you have in this project! Let me know if I can help in any way 🙌🏼

tomjaguarpaw commented 4 years ago

Thanks for the report!

P.S. this is the great idea you have in this project! Let me know if I can help in any way 🙌🏼

I'm glad you like it. To help, please keep filing issues, and if you know the solutions to some issues then help others to solve them :)

fgaz commented 3 years ago

The docs are here: https://cabal.readthedocs.io/en/3.4/cabal-commands.html#cabal-v2-build

Small ticket about improving that part: https://github.com/haskell/cabal/issues/6292