-
Notifications
You must be signed in to change notification settings - Fork 704
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
Suggest --lib in cabal v2-install error message #6237
Comments
It DID do that, I implemented it myself… I wonder why it isn't showing. Also pinging @typedrat, who might have changed some of the logic |
I don’t recall making any changes that would effect it. Do you know what commit added the message? |
f6aaeee (what a nice hash) |
That code is currently in the warnIfNoExes function, which gets called in installExes. Maybe it filters targets the wrong way now? I don't have much time to test it atm |
Please fix this as soon as possible, as the --lib option does not even appear in the cabal 3.0.0.0 (and later) documentation, e.g. here: https://www.haskell.org/cabal/users-guide/installing-packages.html#building-and-installing-packages Is there some documentation that is actually up-to-date, and if yes, where? Thanks! |
I second fixing this. Had to find #6246 to know that "--lib" needed to be added. |
If someone here has the time, a bisect would probably be helpful |
The warning from f6aaeee doesn't appear in 3.0.0.0 because it landed after 3.0.0.0 was cut, which is the cabal-install that came with GHC 8.10.1 for me. Edit: Oh, it appears I was wrong and also confused commit dates when I double-checked. This is the code that landed in 3.0.0.0: cabal/cabal-install/Distribution/Client/CmdInstall.hs Lines 648 to 663 in b0e52fa
trace ("exeMaybe:" ++ show exe) (Just exe) is probably enough to identify which component is reponsible for this and finding a fix.
|
As a haskell newbie, I got a step further. Running
And then I gave up :) |
@TakodaS what were you originally trying to do? For reference, here's the (code that generates the) new warning that only suggests cabal/cabal-install/src/Distribution/Client/CmdInstall.hs Lines 681 to 693 in 7d4ce47
|
@TakodaS: did you, perchance, run your command while in a directory with a Regarding the use case from ticket description, there are various alternatives described in #6481 and |
I was just advised, for the original problem in the ticket description, the following incantation is the best: |
The suggestion still does not appear, does it? that's a regression, and it seems a lot of people are stumbling into it (30 +1s on #6246) |
Nevermind, it does!
Maybe OP was using an older cabal? I'll close optimistically. If anyone (with recent cabal) still isn't getting that message please leave a comment |
This issue still emerges when installing a package with no executables.
It does not suggest to use |
You are using cabal-install 3.6.2.0. The current version of cabal-install is 3.10.1.0 |
As a newby user trying to experiment through
ghci
with, say, thelens
library, the first step would be to installlens
:After this failure, the next step would be to look at
cabal help install
, and then probably to give up. The error message should prominently suggest--lib
as the workaround.The text was updated successfully, but these errors were encountered: