Skip to content

Commit 32931bb

Browse files
committed
Remove spare checks from CollectEntryPoints
1 parent 50486af commit 32931bb

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,21 @@ 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
*/
3331
class 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
35+
def forceRun = ctx.settings.XmainClass.isDefault && ctx.settings.outputDir.value.isInstanceOf[JarArchive]
4036
super.isRunnable && (ctx.sbtCallback != null || forceRun)
4137

42-
4338
override def transformTypeDef(tree: tpd.TypeDef)(using Context): tpd.Tree =
4439
getEntryPoint(tree).map(registerEntryPoint)
4540
tree

0 commit comments

Comments
 (0)