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
tasks.withType(ScalaCompile::class.java).configureEach fails on multi-project builds #6558
Comments
I can confirm this is still an issue on latest master. So most likely an issue for as well 4.10 since the wrapper of the repo is 4.9. |
@oehme this may be a 4.10.1 candidate |
* origin/release: Upgrade Kotlin DSL to 1.0-RC5 Introduce `AutoAppliedBuildScanPlugin#addBuildScanPluginDependencySpecTo` Assert all tasks are executed as expected when tasks come from rules Workaround rule problems described in #6249 Look for domain objects created by rules in named Fix unit test on Windows Ensure that ide destroy tasks always run before generate tasks Make binary compatibility check happy Reduce visibility of methods in AbstractScalaCompile Move configuration of the publication to Scala plugin Fix unit tests and doc TODOs Reintroduce separate configuration to resolve incremental analysis files Add publication late to avoid interfering with default publications Make task property validator happy Convert test to Spock Usage variant aware dependency management to share analysis files Rename test Avoid iterating over tasks in subprojects from ScalaCompile Reduce #6558 into generic task Reproduce failure in #6558
This is fixed in 4.10.1 |
This 'fix' breaks our build which worked flawlessly on 4.10.
|
@drujd can you describe a bit more about how your build is setup? Could you share a build scan? Do you have a mixture of Scala and Java projects or just Scala projects or something else? Thanks! |
That's great! I unfortunately cannot share a build scan, but I will try out the nightly - if it does not work, I will try to create a sample project that replicates the issue. It really looks that #6750 is the issue. |
On a multi-project build, using
tasks.withType(ScalaCompile::class.java).configureEach
leads to a ConcurrentModificationException in thecompileScala
task.Here's a git repository that reproduces the issue: https://github.com/dsilva/repro-tasks-withtype-ScalaCompile-configureEach
Expected Behavior
Build should succeed.
Current Behavior
Gradle crashes.
Context
I'm trying to use the new tasks API:
https://blog.gradle.org/preview-avoiding-task-configuration-time
https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
Steps to Reproduce (for bugs)
See https://github.com/dsilva/repro-tasks-withtype-ScalaCompile-configureEach
Your Environment
The text was updated successfully, but these errors were encountered: