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

cabal install of library behavior does not match documentation #6913

Closed
joeyh opened this issue Jun 17, 2020 · 6 comments
Closed

cabal install of library behavior does not match documentation #6913

joeyh opened this issue Jun 17, 2020 · 6 comments

Comments

@joeyh
Copy link

joeyh commented Jun 17, 2020

Describe the bug

cabal install, run in a package that is a library, complains that it "does
not contain any executables". I expected the old cabal behavior of installing it to the global library directory.

cabal install --lib works. However, cabal install --help says, at the top:
"If TARGET is a library, it will be added to the global environment."

it took me some hunting to realize that was wrong and that I now need --lib.

To Reproduce

cabal unpack Cabal-3.2.0.0
cd Cabal-3.2.0.0
cabal install 

System information

cabal-install version 3.0.0.0
compiled using version 3.0.1.0 of the Cabal library 
@yaxu
Copy link

yaxu commented Jul 5, 2020

I'd argue that it's the behaviour that is wrong, rather than the documentation, ref #6481

@gbaz
Copy link
Collaborator

gbaz commented Sep 30, 2021

relatedly, the cabal manual still has the wrong info at https://cabal.readthedocs.io/en/3.6/installing-packages.html#building-and-installing-packages even though nearly everywhere else is cleaned up.

@Mikolaj
Copy link
Member

Mikolaj commented Sep 30, 2021

Well spotted. Volunteers welcome.

@ulysses4ever
Copy link
Collaborator

The problematic wording from OP ("If TARGET is a library") has been fixed in b0e88b1 (by adding "and --lib is used").

The problematic docs mentioned by @gbaz have been purged in aa3d66d.

Should this be closed? I think that cabal install docs could be (even) more clear that installing a library into the global env is a bad idea, and teach about --package-env more eagerly. But this current ticket seems to have been well served.

@Mikolaj
Copy link
Member

Mikolaj commented Jun 25, 2022

I think you are right. If nobody objects, let's close in favour of a more up to date or more detailed ticket (probably a new one, but who knows what we already have).

@Mikolaj
Copy link
Member

Mikolaj commented Jun 27, 2022

Thank you; closing.

@Mikolaj Mikolaj closed this as completed Jun 27, 2022
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

6 participants