-
Notifications
You must be signed in to change notification settings - Fork 455
don't control concurrency from INSIDE_DUNE #12800
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
base: main
Are you sure you want to change the base?
Conversation
0cb608f to
8822feb
Compare
|
FTR oxcaml still won't build with the correct concurrency with this patch because they are specifically vendoring Dune 3.20 and using that to build. We therefore have to patch their opam build to not do that. If we are going to do that anyway, then we might as well unset |
|
Another issue with this PR is that comparing against |
|
I do wonder why the CI doesn't want to run the jobs that run the test-suite… |
|
@Leonidas-from-XIV The nix tests are a dependency of the rest of the tests. That way we can catch errors early and not bother using up all the allocated machines. The fact that the environment is Nix doesn't mean much here, its just the regular test suite. |
|
Yes, I can confirm that this doesn't help the OxCaml build by itself. I believe we will need to update the Dune version used to bootstrap the compiler to actually see the difference. |
8822feb to
e403ac6
Compare
cf28308 to
20d5d73
Compare
test/blackbox-tests/test-cases/watching/watching-eager-concurrent-runtest-command.t
Outdated
Show resolved
Hide resolved
test/blackbox-tests/test-cases/watching/watching-eager-concurrent-exec-command.t
Outdated
Show resolved
Hide resolved
|
This looks reasonable to me. I'll run tests with this branch on the build of the OxCaml compiler and report back. |
|
I've run some tests for this with OxCaml compiler build and it does appear to enable using concurrency with nested Dune calls which it previously wasn't. To reproduce:
To compare some numbers on time taken to build
Given the performance of the patch, I believe it does enable concurrent builds in the case of nested Dune. I think we can go ahead and merge this PR, provided everything else is ok. |
20d5d73 to
ed3cc8e
Compare
ed3cc8e to
36e02a4
Compare
Signed-off-by: Ali Caglayan <[email protected]>
36e02a4 to
610ba7f
Compare
Signed-off-by: Ali Caglayan <[email protected]>
610ba7f to
07a66be
Compare
INSIDE_DUNEsets the concurrency ofduneto1. We use this behaviour when running our tests. However, runningduneinside ofdune, as is common in package management, means that the child process also observesINSIDE_DUNEand therefore affects the concurrency when we haven't explicitly passed-j, as is the case for OxCaml:INSIDE_DUNEand build concurrency #12737This PR introduces a new environment variable
DUNE_JOBSwhose sole job is to configure the concurrency from the environment.Our second change is to decouple the concurrency control from
INSIDE_DUNE. This means thatINSIDE_DUNEno longer sets the concurrency to1. This means that we have to explicitly setDUNE_JOBSin our cram tests. We don't however set the value for the expect tests.Setting
DUNE_JOBSfor our cram tests has an unfortunate side-effect, andiswas the cause of most of the noise in this PR. It triggers a warning message given by an RPC client when adune's config differs from the default values. I've therefore disabled this warning whenINSIDE_DUNEsince it doesn't have any utility for us. Also, depending on thepidcontents of the build lock in a racy way is not sound.