Skip to content

Thread-safe analysis callback#626

Merged
jvican merged 4 commits intosbt:developfrom
dotta:issue/405-thread-safe-analaysis-callback
Dec 30, 2018
Merged

Thread-safe analysis callback#626
jvican merged 4 commits intosbt:developfrom
dotta:issue/405-thread-safe-analaysis-callback

Conversation

@dotta
Copy link
Contributor

@dotta dotta commented Dec 15, 2018

Fixes #405

@typesafe-tools
Copy link

To validate this pull request against other sbt modules, please visit this link.

This commit simply turns all mutable data structures into concurrent ones.
The Triplequote Hydra Scala compiler may compile a same source file from
different workers. Hence, the assertion need to be remove or relaxed. After
discussing with @jvican, the assertion is moved behind a strictMode flag as it
might still be useful for debugging incremental compiler's issues.
The IncOptions#ignoredScalacOptions field is available since 1.2.0 not 1.3.0.
Had to correct this as otherwise MiMa reports the following issues:

```
[error]  * method
of(Int,Double,Boolean,Boolean,Int,java.util.Optional,java.util.Optional,Boolean,java.util.Optional,Boolean,Boolean,Boolean,java.util.Map,Boolean,xsbti.compile.ExternalHooks,Array[java.lang.String])xsbti.compile.IncOptions
in class xsbti.compile.IncOptions does not have a correspondent in current
version
[error]    filter with:
ProblemFilters.exclude[DirectMissingMethodProblem]("xsbti.compile.IncOptions.of")
[error]  * method
create(Int,Double,Boolean,Boolean,Int,java.util.Optional,java.util.Optional,Boolean,java.util.Optional,Boolean,Boolean,Boolean,java.util.Map,Boolean,xsbti.compile.ExternalHooks,Array[java.lang.String])xsbti.compile.IncOptions
in class xsbti.compile.IncOptions does not have a correspondent in current
version
[error]    filter with:
ProblemFilters.exclude[DirectMissingMethodProblem]("xsbti.compile.IncOptions.create")
```
@dotta dotta force-pushed the issue/405-thread-safe-analaysis-callback branch from 92b8fc2 to 6aeb771 Compare December 15, 2018 19:15
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dotta
Copy link
Contributor Author

dotta commented Dec 19, 2018

@jvican Could you have a look? I'm going to be away from Friday on and I'd really appreciate to have this merged before there are conflicts. Thanks!

Copy link
Member

@jvican jvican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😄 thanks @dotta!

@jvican jvican merged commit 5cb1de5 into sbt:develop Dec 30, 2018
@dotta
Copy link
Contributor Author

dotta commented Jan 3, 2019

Whohooo! 🍾

@dotta dotta deleted the issue/405-thread-safe-analaysis-callback branch January 3, 2019 13:55
@eed3si9n eed3si9n added this to the 1.3.0 milestone Apr 28, 2019
@eed3si9n eed3si9n changed the title Issue/405 thread safe analaysis callback Thread-safe analysis callback Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a thread-safe version of AnalysisCallback

4 participants