-
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
-j
should build package components in parallel
#2623
Comments
IIRC on |
In 1.18.1.5:
master:
Dunno if it makes sense to build different components in parallel if the build of single component is already parallel. btw. you can |
Can be useful if you have a package with a bazillion executables/components. |
You don't need a lot of executables/components before it would be faster than |
Hey guys, so I'm working on a refactor for the Cabal library that distinguishes components from packages. Once this is done, we can push the change up so that cabal-install creates a graph of components rather than packages, and then this issue will be solved. There might be some potholes along the way though. |
@ezyang what's the status of this? building cabal takes awfully long, and utilizes only one of the 8 available cores. Could you elaborate on what is done and what still needs to be done? Also if related, how this ties in with the using shake ticket? |
With cabal-install HEAD (soon to be 2.0), if you new-build and your components are in non-Custom packages, they will be built in parallel. This doesn't help much with building a single library, since Cabal makes a single call to GHC to build it, and thus does not have any opportunities for parallelism. I think we have another ticket on this. |
I believe the other ticket you are referring to is #976. |
OK, I'm going to close this ticket as it is thinking about component-level parallelism specifically. |
cabal install -j foo
will build and install foo and its dependencies in parallel, it works on the package level.$ cabal build -j
doesn't use the-j
flag (or maybe just passes it to GHC), but it doesn't build the different package components in parallel. It'd be great if it would build all your executables, tests and benchmarks in parallel instead of in sequence as today.The extra parallelism would be very useful when you're developing a package and you constantly recompile your single package (not its dependencies).
The text was updated successfully, but these errors were encountered: