-
Notifications
You must be signed in to change notification settings - Fork 701
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 v2-install both library and executable #6480
Comments
This is weird. @fgaz do you know what may be the cause? |
I can't think of any reason why it should do that. @typedrat? |
I looked a bit at the code and it seems that on the installLibraries branch the component-type filtering is only done after the building and before the installation in the env file: cabal/cabal-install/Distribution/Client/CmdInstall.hs Lines 844 to 856 in 0d4ee7b
|
Which explains why
(the warning is bogus and has nothing to do with the issue) |
Describe the bug
If I install a library followed by its executable, both seem to get rebuilt. This could be avoided if there were an easy way (e.g.
--exe --lib
) to build both in the first place, or if the command were smart enough to avoid the duplicate build.To Reproduce
Steps to reproduce the behavior:
Expected behavior
My original build (with
--lib
) already built the executable. It would be nice if it didn't have to be rebuilt, or failing that, if there were a way to explicitly request both to be installed.System information
cabal
3.0.0.0,ghc
8.8.1Additional context
Sample output:
It's not quite as bad as a full rebuild, but it still requires extra time if you build the library and executable multiple times.
The text was updated successfully, but these errors were encountered: