Skip to content

Commit bc6ad01

Browse files
authored
doctool: propagate errors from inspectAllTastyFiles
it's not pretty, but it does work. tested with: ``` sbt 'scaladoc/runMain dotty.tools.scaladoc.Main ./bad -d a -siteroot empty' ``` and it will produce something like ``` -- Error: src/main/scala/Main.scala:26:12 -------------------------------------- undefined: m.parse # -1: TermRef(TermRef(NoPrefix,val m),parse) at readTasty 1 error found Failure [error] nonzero exit code returned from runner: 1 [error] (scaladoc / Compile / runMain) nonzero exit code returned from runner: 1 ```
1 parent d743501 commit bc6ad01

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/TastyParser.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ object ScaladocTastyInspector:
160160
report.error("File extension is not `tasty` or `jar`: " + invalidPath)
161161

162162
if tastyPaths.nonEmpty then
163-
TastyInspector.inspectAllTastyFiles(tastyPaths, jarPaths, classpath)(inspector)
163+
val tastyOk = TastyInspector.inspectAllTastyFiles(tastyPaths, jarPaths, classpath)(inspector)
164+
if !tastyOk then
165+
report.error("Failure")
164166

165167
val all = inspector.topLevels.result()
166168
all.groupBy(_._1).map { case (pckName, members) =>

0 commit comments

Comments
 (0)