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

How to cabal init library, executable and test suite? #8658

Open
philderbeast opened this issue Jan 9, 2023 · 2 comments
Open

How to cabal init library, executable and test suite? #8658

philderbeast opened this issue Jan 9, 2023 · 2 comments

Comments

@philderbeast
Copy link
Collaborator

How do I use cabal init to build a package that has a library, executable and test suite? As posed, this reads like a multichoice question and answer. The list delimiters around [default: Executable] suggest that too.

$ cabal init
What does the package build:
   1) Library
 * 2) Executable
   3) Library and Executable
   4) Test suite
Your choice? [default: Executable] [3,4]
[3,4] is not a valid choice. Please choose a number from 1 to 4.

I don't need help answering this question but as a first time cabal init user but long time cabal user I thought I should show just how much this prompt and response tripped me up.

@Mikolaj
Copy link
Member

Mikolaj commented Jan 9, 2023

Yes, the UI is misleading and, ideally, we should permit this, with the expected semantics. However, it should work also on commandline (cabal init --lib --executable), which potentially has other problems, see #8659.

@emilypi
Copy link
Member

emilypi commented Jan 16, 2023

Considering this is the first issue in almost 15 years to the effect that the UI seems to be multichoice, I'm going to say I disagree that this is an issue that a significant number of users experience. However I do agree there are enhancements to the UI such as taking multiple entries here, at precisely this stage with a prompt that makes sense. It wouldn't be rocket surgery, but it would be a significant change to the prompt code which isn't fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants