-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
BSP: tasks seem to be executed duplicately and concurrently #2818
Comments
All the above was tested on |
I'd assume, that if the |
I opened discussion #2820 to address this |
I opened PR #2980 with a fix. Thank you @pieter-bos for this excellent bug description and the python script to reproduce! |
…2980) With this change, we synchronize evaluations of the same terminal task. This isn't necessarily needed for normal Mill executions, but in a BSP context, where multiple requests where handled concurrently in the same Mill instance, evaluating the same task concurrently can happen. We don't synchronize multiple Mill-instances (e.g. run in two shells) or multiple evaluator-instances (which should have different `out`-dirs anyway). Fix: #2818 Pull request: #2980
Setup:
As far as I understand mill's concurrency model: different tasks may be executed in parallel and their order is not guaranteed (other than implied by task dependencies). However, one specific task is always run with a fresh
T.dest
and only once at a time. This seems to be the case if I run e.g.mill -j 8 tasks.allStuff
here:directory
is evaluated only once (assumed from run time) and from a freshT.dest
(afterwards there is only one file there).Via BSP it seems this is not the case. I tried importing this build configuration from IntelliJ, and can also recreate this with a small python script. The idea is I request
buildTarget/sources
andbuildTarget/resources
without waiting for a response for the first - as IntelliJ also seems to do. Afterwards I can see thatdirectory
was run twice in parallel within the sameT.dest
:It seems to me that this should never be possible, though I apologize if I'm misunderstanding something :)
The text was updated successfully, but these errors were encountered: