File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -20,25 +20,20 @@ import dotty.tools.backend.jvm.GenBCode
2020
2121/**
2222 * Small phase to be run to collect main classes and store them in the context.
23- * The general rule to run this phase is either :
24- * - The output of compilation is JarArchive and there is no `-Xmain-class` defined
25- * - The compiler is run from sbt and is forced by flags forcing `ExtractorAPI`
23+ * The general rule to run this phase is:
24+ * - The output of compilation is JarArchive
25+ * - There is no `-Xmain-class` defined
2626 *
2727 * The following flags affect this phase:
2828 * -d path.jar
2929 * -Xmain-class
30- * -Yforce-sbt-phases
31- * -Ydump-sbt-inc
3230 */
3331class CollectEntryPoints extends MiniPhase :
3432 def phaseName : String = " Collect entry points"
3533
3634 override def isRunnable (using Context ): Boolean =
37- def forceRun = (ctx.settings.XmainClass .isDefault && ctx.settings.outputDir.value.isInstanceOf [JarArchive ]) ||
38- ctx.settings.YdumpSbtInc .value ||
39- ctx.settings.YforceSbtPhases .value
40- super .isRunnable && (ctx.sbtCallback != null || forceRun)
41-
35+ def forceRun = ctx.settings.XmainClass .isDefault && ctx.settings.outputDir.value.isInstanceOf [JarArchive ]
36+ super .isRunnable && forceRun
4237
4338 override def transformTypeDef (tree : tpd.TypeDef )(using Context ): tpd.Tree =
4439 getEntryPoint(tree).map(registerEntryPoint)
You can’t perform that action at this time.
0 commit comments