-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
prevent concurrent modifications of sources by limiting concurrency #153
prevent concurrent modifications of sources by limiting concurrency #153
Conversation
f429bd9
to
fcfd608
Compare
@@ -375,6 +378,9 @@ object ScalafixPlugin extends AutoPlugin { | |||
} | |||
} | |||
} | |||
task.tag(scalafixTag) |
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.
task.tag(scalafixTag) | |
task |
breaks the scripted
[info] [error] (Compile / check) java.lang.AssertionError: assertion failed: missing footer in
[info] [error] <<<// HEADER
[info] [error] object Example
[info] [error] >>>
When rewrite rules are executed, `scalafix` and `scalafixAll` may conflict with other tasks transforming `unmanagedSources`. Since there is no way to identify such tasks given the sbt model, and to be defensive against this scenario, `scalafix` tasks may only run concurrently with other `scalafix` tasks, but not with any other tasks. For explicit invocations, this should not damage throughput, but for complex builds with `scalafixOnCompile := true`, this can have a limited impact during the first compile; after that caching should make it negligible.
fcfd608
to
fc56a83
Compare
@sjrd I am proposing this to address the concerns you expressed in #140 (comment)
|
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.
LGTM 👍
I am constantly impressed with your ability to write integration tests that stress tricky to reproduce scenarios.
FYI I’ll be away for a few weeks and may not comment much on GitHub
Enjoy your break! I'll also be AFK some random weeks during the next 5 ones. |
When rewrite rules are executed,
scalafix
andscalafixAll
may conflict with other tasks transformingunmanagedSources
. Since there is no way to identify such tasks given the sbt model, and to be defensive against this scenario,scalafix
tasks may only run concurrently with otherscalafix
tasks, but not with any other tasks.For explicit invocations, this should not damage throughput, but for complex builds with
scalafixOnCompile := true
, this can have a limited impact during the first compile; after that caching should make it negligible.