Skip to content
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

Avoid race conditions during slow/test command. #951

Merged
merged 1 commit into from Sep 30, 2019
Merged

Conversation

@olafurpg
Copy link
Member

olafurpg commented Sep 29, 2019

See sbt/sbt-buildinfo#152 for a discussion on
how sbt-buildinfo uses the same target directory for compiling a project
across different Scala versions. Sharing the target directory is safe
under normal usage of the sbt task engine but it's risky when using
State. An example of a failed CI job caused by this bug is
https://travis-ci.org/scalameta/metals/jobs/590512863

This commit reduces the risk of race conditions during sbt-buildinfo
code generation by forcing the publishLocal steps for Scala 2.11 and
Scala 2.13 to run synchronously, instead of in parallel.

See sbt/sbt-buildinfo#152 for a discussion on
how sbt-buildinfo uses the same target directory for compiling a project
across different Scala versions. Sharing the target directory is safe
under normal usage of the sbt task engine but it's risky when using
`State`. An example of a failed CI job caused by this bug is
https://travis-ci.org/scalameta/metals/jobs/590512863

This commit reduces the risk of race conditions during sbt-buildinfo
code generation by forcing the `publishLocal` steps for Scala 2.11 and
Scala 2.13 to run synchronously, instead of in parallel.
@olafurpg olafurpg force-pushed the olafurpg:race branch from 92166b7 to 21fc160 Sep 29, 2019
Copy link
Collaborator

tgodzik left a comment

Awesome! LGTM

@olafurpg olafurpg merged commit eecd76e into scalameta:master Sep 30, 2019
2 checks passed
2 checks passed
build
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@olafurpg olafurpg deleted the olafurpg:race branch Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.