Skip to content

Commit be4e95d

Browse files
author
exoego
committed
Test whether Scala.js class is on the classpath of the project.
1 parent 4bd9e13 commit be4e95d

File tree

1 file changed

+1
-6
lines changed
  • scalac-scoverage-plugin/src/main/scala/scoverage

1 file changed

+1
-6
lines changed

scalac-scoverage-plugin/src/main/scala/scoverage/plugin.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ class ScoverageInstrumentationComponent(val global: Global, extraAfterPhase: Opt
108108
private var coverageFilter: CoverageFilter = AllCoverageFilter
109109

110110
private val isScalaJsEnabled: Boolean = {
111-
try {
112-
getClass.getClassLoader.loadClass("scala.scalajs.js.Any")
113-
true
114-
} catch {
115-
case _: ClassNotFoundException => false
116-
}
111+
rootMirror.getClassIfDefined("scala.scalajs.js.Any") != NoSymbol
117112
}
118113

119114
def setOptions(options: ScoverageOptions): Unit = {

0 commit comments

Comments
 (0)