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

People do not read (the Warning about --lib is regularly ignored) #6856

Closed
TomMD opened this issue May 28, 2020 · 1 comment
Closed

People do not read (the Warning about --lib is regularly ignored) #6856

TomMD opened this issue May 28, 2020 · 1 comment
Milestone

Comments

@TomMD
Copy link
Contributor

TomMD commented May 28, 2020

Describe the bug

People show up at various places around the internet with complaints about cabal install not installing their library (see this recent example: https://stackoverflow.com/questions/62073719/why-is-installing-a-haskell-package-not-working).

To Reproduce

  1. Make a useful tool
  2. Gain popularity
  3. Change it's behavior
  4. Let humans be humans

Expected behavior
People read.

Additional context

I think we need the line:

Warning: You asked to install executables, but there are no executables in
target: binary-bits. Perhaps you want to use --lib to install libraries
instead

To be bold and red when the terminal allows. Thoughts?

I'm not sure how to do this portably, but direct use of escape sequences does work:

Prelude> putStrLn "\x1b[31m Warning: You asked to install executables \x1b[0m"
 Warning: You asked to install executables
--- ^^^ That's red
@TomMD
Copy link
Contributor Author

TomMD commented May 28, 2020

See #6857 for the fix.

@phadej phadej closed this as completed in 2071398 Jun 4, 2020
phadej added a commit that referenced this issue Jun 4, 2020
…ad-and-i-do-not-start-seeing-red

Fix #6856 Make `--lib` warning louder and clearer
@phadej phadej added this to the 3.4.0.0-rc1 milestone Jul 13, 2020
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

No branches or pull requests

2 participants