-
-
Notifications
You must be signed in to change notification settings - Fork 421
Issue #6206: Add withParallel Scala.js linker option #6207
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?
Issue #6206: Add withParallel Scala.js linker option #6207
Conversation
|
Testing results are inconclusive. I'm testing on a Mill based monorepo with ~25 modules, most of which are Scala.js and many of those have Scala.js test modules, and all I'm doing is manually running: The first two operations always succeed and it gives With this PR, you can add the following line to override def scalaJSParallel = Task { false }With parallel set to With parallel set to With parallel set to The next thing would probably be to start profiling, but as a feature - based on the visible behaviour change - I feel confident saying that it is probably doing the right thing (i.e. changing the linker flag) ...but it doesn't solve the problem of Mill crashing when there are a high number of concurrent Scala.js builds, and as such, I'm ambivalent about whether it's worth continuing here or not. |
|
I wonder if Also, a good default could be based on the value of |
I was 100% cargo-culting an existing flag. If you think it shouldn't be a task or if the naming feels wrong / non-idiomatic I'm happy to alter it.
I don't think they're particularly related. In my case for example, I'm sometimes saying I briefly showed this to @sjrd (hope you don't mind me sharing!) and he provided a relevant comment (both, I think, to my wider problem and to the comment above about parallelism default values):
|
|
So if it is advised to not run multiple ScalaJS linkers in parallel, or limit the overall parallelism of these jobs, we could manage and limit the maximal number of parallel running linker processes. Meaning, we just wait and block until a slot becomes free. This should be implemented in This is of course a different solution to the current state of this PR. I think, the proposed |
|
Yes indeed. The PR isn't invalid or wrong (sbt exposes this linker option), it just doesn't help me in the way I hoped it might. Happy for it to be closed without merging if you don't want it. |
Asking @lolgab, our ScalaJS expert, if we want it. I will not merge it as-is for the reasons outlined above: #6207 (comment)
|
I think it's valuable to expose the settings if it's available as a setting in Scala.js. If we make it a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Let's include this configuration. @davesmith00000 can you add a test case, or modify one of the existing test cases to cover the new task and the success of the Scala.js toolchain with both states?
|
@davesmith00000 FYI, I opened #6260, which limits the parallel linking jobs. Would be cool if you could check it out and give feedback. |
|
Good morning @lefou. I've had a go at adding a test suite as requested, but for reasons I haven't quite worked out yet (and I've run out of time this morning), one of the test cases is failing. The first two tests essentially just check that the property has been set correctly, and the last one (based on the source map tests) is supposed to fastLink the module and check that it built, but it currently produces no public modules in the report. I'll have another look as soon as I can, but if you or perhaps @lolgab happen to notice that I've made some common/silly error, please do let me know! |
Relates to: #6206
I'm trying to organise local testing.