Skip to content

Commit 95ada5b

Browse files
authored
Don't run genjavadoc while generating scaladoc (#167)
When generating scaladoc, not the scala compiler is run with a limited set of phases. Notably, it runs it without the 'fields' phase which genjavadoc depends on, disabling genjavadoc while producing the warning `dropping dependency on node with no phase object: fields`. When you have `-Xfatal-warnings` enabled, this then leads to an error. Inspired by HairyFotr/linter#23
1 parent a5fc796 commit 95ada5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/src/main/scala/com/typesafe/genjavadoc/Plugin.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ class GenJavadocPlugin(val global: Global) extends Plugin {
2828

2929
val name = "genjavadoc"
3030
val description = ""
31-
val components = List[PluginComponent](MyComponent)
31+
val components: List[PluginComponent] =
32+
if (global.settings.isScaladoc) List.empty
33+
else List(MyComponent)
3234

3335
override def processOptions(options: List[String], error: String Unit): Unit = {
3436
myOptions = new Properties()

0 commit comments

Comments
 (0)