Merge pull request #4175 from cunei/wip-fix4148

Fix for #4148 (SessionSettingsSpec intermittently fails)
This commit is contained in:
Dale Wijnand 2018-05-29 10:27:08 +01:00 committed by GitHub
commit 17f5bc149e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -148,7 +148,9 @@ private[sbt] object SbtParser {
reporter.reset()
val wrapperFile = new BatchSourceFile(reporterId, code)
val unit = new CompilationUnit(wrapperFile)
val parser = new syntaxAnalyzer.UnitParser(unit)
val parser = SbtParser.synchronized { // see https://github.com/sbt/sbt/issues/4148
new syntaxAnalyzer.UnitParser(unit)
}
val parsedTrees = SbtParser.synchronized { // see https://github.com/scala/bug/issues/10605
parser.templateStats()
}