Merge pull request #3743 from cunei/wip-flakyTests1

Workaround for scala/bug#10605
This commit is contained in:
Dale Wijnand 2017-11-16 10:58:53 +00:00 committed by GitHub
commit 8fe38d4a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -142,7 +142,9 @@ private[sbt] object SbtParser {
val wrapperFile = new BatchSourceFile(reporterId, code)
val unit = new CompilationUnit(wrapperFile)
val parser = new syntaxAnalyzer.UnitParser(unit)
val parsedTrees = parser.templateStats()
val parsedTrees = SbtParser.synchronized { // see https://github.com/scala/bug/issues/10605
parser.templateStats()
}
parser.accept(scala.tools.nsc.ast.parser.Tokens.EOF)
globalReporter.throwParserErrorsIfAny(reporter, filePath)
parsedTrees -> reporterId