File tree Expand file tree Collapse file tree 2 files changed +6
-19
lines changed
compiler/src/main/scala/org/scalajs/core/compiler
junit-plugin/src/main/scala/org/scalajs/junit/plugin Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,13 @@ class ScalaJSPlugin(val global: Global) extends NscPlugin {
59
59
}
60
60
61
61
/** Checks and registers module exports on the symbol.
62
- * This bridge allows other plugins (such as ScalaJSJUnitPlugin) to register
63
- * new modules for export between jsinterop and jscode phases. It is meant to
64
- * be accessed using reflection. The calling code still must insert the
65
- * `@JSExport` annotation to the module.
62
+ *
63
+ * This bridge allows other plugins to register new modules for export
64
+ * between jsinterop and jscode phases. It is meant to be accessed using
65
+ * reflection. The calling code still must insert the `@JSExport` annotation
66
+ * to the module.
66
67
*/
68
+ @ deprecated(" Might be removed at any time, use at your own risk." , " 0.6.24" )
67
69
def registerModuleExports (sym : Symbol ): Unit =
68
70
PrepInteropComponent .registerModuleExports(sym)
69
71
Original file line number Diff line number Diff line change @@ -87,20 +87,6 @@ class ScalaJSJUnitPlugin(val global: Global) extends NscPlugin {
87
87
88
88
val description : String = " Makes JUnit test classes invokable in Scala.js"
89
89
90
- // `ScalaJSPlugin` instance reference. Only `registerModuleExports` is accessible.
91
- private lazy val scalaJSPlugin = {
92
- type ScalaJSPlugin = NscPlugin {
93
- def registerModuleExports (sym : ScalaJSJUnitPluginComponent .global.Symbol ): Unit
94
- }
95
- global.plugins.collectFirst {
96
- case pl if pl.getClass.getName == " org.scalajs.core.compiler.ScalaJSPlugin" =>
97
- pl.asInstanceOf [ScalaJSPlugin ]
98
- }.getOrElse {
99
- throw new Exception (
100
- " The Scala.js JUnit plugin only works with the Scala.js plugin enabled." )
101
- }
102
- }
103
-
104
90
object ScalaJSJUnitPluginComponent
105
91
extends plugins.PluginComponent with transform.Transform with Compat210Component {
106
92
@@ -238,7 +224,6 @@ class ScalaJSJUnitPlugin(val global: Global) extends NscPlugin {
238
224
ClassInfoType (newParentsInfo, decls, bootSym.info.typeSymbol)
239
225
}
240
226
bootSym.setInfo(newClazzInfo)
241
- scalaJSPlugin.registerModuleExports(bootSym)
242
227
bootClazz.setSymbol(bootSym)
243
228
244
229
currentRun.symSource(bootSym) = clazz.symbol.sourceFile
You can’t perform that action at this time.
0 commit comments