@@ -165,11 +165,11 @@ class LsifBuildTool(index: IndexCommand) extends BuildTool("LSIF", index) {
165165 return CommandResult (0 , Nil )
166166 }
167167
168- val compileAttemtps = ListBuffer .empty[Try [Unit ]]
169- compileAttemtps += compileJavaFiles(tmp, deps, config, javaFiles)
170- compileAttemtps += compileScalaFiles(deps, scalaFiles)
171- compileAttemtps += compileKotlinFiles(deps, config, kotlinFiles)
172- val errors = compileAttemtps .collect { case Failure (exception) =>
168+ val compileAttempts = ListBuffer .empty[Try [Unit ]]
169+ compileAttempts += compileJavaFiles(tmp, deps, config, javaFiles)
170+ compileAttempts += compileScalaFiles(deps, scalaFiles)
171+ compileAttempts += compileKotlinFiles(deps, config, kotlinFiles)
172+ val errors = compileAttempts .collect { case Failure (exception) =>
173173 exception
174174 }
175175
@@ -179,6 +179,9 @@ class LsifBuildTool(index: IndexCommand) extends BuildTool("LSIF", index) {
179179 val isSemanticdbGenerated = Files
180180 .isDirectory(targetroot.resolve(" META-INF" ))
181181 if (errors.nonEmpty && ! isSemanticdbGenerated) {
182+ errors.foreach { error =>
183+ index.app.reporter.log(Diagnostic .exception(error))
184+ }
182185 CommandResult (1 , Nil )
183186 } else {
184187 if (errors.nonEmpty && isSemanticdbGenerated) {
@@ -376,8 +379,9 @@ class LsifBuildTool(index: IndexCommand) extends BuildTool("LSIF", index) {
376379 )(fn : PresentationCompiler => T ): T = {
377380 val scalaVersion = deps
378381 .classpath
379- .headOption
382+ .iterator
380383 .flatMap(jar => ScalaVersion .inferFromJar(jar))
384+ .nextOption()
381385 .getOrElse {
382386 throw new IllegalArgumentException (
383387 s " failed to infer the Scala version from the dependencies: " +
0 commit comments