Skip to content

Commit 9d04989

Browse files
committed
Shorten or normalize phase name
1 parent 2453572 commit 9d04989

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ import java.nio.file.Path
4949
*/
5050
class ExtractSemanticDB private (phaseMode: ExtractSemanticDB.PhaseMode) extends Phase:
5151

52-
override val phaseName: String = ExtractSemanticDB.phaseNamePrefix + phaseMode.toString()
52+
override val phaseName: String = s"""${ExtractSemanticDB.phaseNamePrefix}${
53+
import ExtractSemanticDB.PhaseMode.*
54+
phaseMode match
55+
case ExtractSemanticInfo => "ExtractInfo"
56+
case AppendDiagnostics => "AppendDiag"
57+
}"""
5358

5459
override val description: String = ExtractSemanticDB.description
5560

@@ -129,7 +134,7 @@ object ExtractSemanticDB:
129134
import java.nio.file.Files
130135
import java.nio.file.Paths
131136

132-
val phaseNamePrefix: String = "extractSemanticDB"
137+
val phaseNamePrefix: String = "semanticDB"
133138
val description: String = "extract info into .semanticdb files"
134139

135140
enum PhaseMode:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ class CollectEntryPoints extends MiniPhase:
4949
}
5050

5151
object CollectEntryPoints:
52-
val name: String = "Collect entry points"
52+
val name: String = "collectEntryPoints"
5353
val description: String = "collect all entry points and save them in the context"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ class SetRootTree extends Phase {
4444
}
4545

4646
object SetRootTree {
47-
val name: String = "SetRootTree"
47+
val name: String = "setRootTree"
4848
val description: String = "set the rootTreeOrProvider on class symbols"
4949
}

sbt-bridge/test/xsbt/CompileProgressSpecification.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class CompileProgressSpecification {
5656
"sbt-deps",
5757
"posttyper",
5858
"sbt-api",
59-
"SetRootTree",
59+
"setRootTree",
6060
"pickler",
6161
"inlining",
6262
"postInlining",

tests/printing/transformed/lazy-vals-legacy.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[syntax trees at end of MegaPhase{dropOuterAccessors, dropParentRefinements, checkNoSuperThis, flatten, transformWildcards, moveStatic, expandPrivate, restoreScopes, selectStatic, Collect entry points, collectSuperCalls, repeatableAnnotations}]] // tests/printing/transformed/lazy-vals-legacy.scala
1+
[[syntax trees at end of MegaPhase{dropOuterAccessors, dropParentRefinements, checkNoSuperThis, flatten, transformWildcards, moveStatic, expandPrivate, restoreScopes, selectStatic, collectEntryPoints, collectSuperCalls, repeatableAnnotations}]] // tests/printing/transformed/lazy-vals-legacy.scala
22
package <empty> {
33
@SourceFile("tests/printing/transformed/lazy-vals-legacy.scala") final module
44
class A extends Object {

tests/printing/transformed/lazy-vals-new.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[syntax trees at end of MegaPhase{dropOuterAccessors, dropParentRefinements, checkNoSuperThis, flatten, transformWildcards, moveStatic, expandPrivate, restoreScopes, selectStatic, Collect entry points, collectSuperCalls, repeatableAnnotations}]] // tests/printing/transformed/lazy-vals-new.scala
1+
[[syntax trees at end of MegaPhase{dropOuterAccessors, dropParentRefinements, checkNoSuperThis, flatten, transformWildcards, moveStatic, expandPrivate, restoreScopes, selectStatic, collectEntryPoints, collectSuperCalls, repeatableAnnotations}]] // tests/printing/transformed/lazy-vals-new.scala
22
package <empty> {
33
@SourceFile("tests/printing/transformed/lazy-vals-new.scala") final module
44
class A extends Object {

0 commit comments

Comments
 (0)