Skip to content

Commit 630579b

Browse files
committed
Fix tests
1 parent 2c46c3e commit 630579b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111

112112
- name: Cmd Tests
113113
run: |
114-
./project/scripts/sbt ";scala3-bootstrapped/compile ; scala3-bootstrapped/publishLocal; scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-test/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
114+
./project/scripts/sbt ";scala3-bootstrapped/compile; scala3-bootstrapped/publishLocal; scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-test/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
115115
./project/scripts/bootstrapCmdTests
116116
117117
- name: MiMa

compiler/src/MainGenericRunner.scala renamed to compiler/src/dotty/tools/MainGenericRunner.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package dotty.tools
22

3+
34
import scala.annotation.tailrec
45
import scala.io.Source
56
import scala.util.Try
6-
import scala.util.matching.Regex
77
import java.net.URLClassLoader
88

99
enum ExecuteMode:
@@ -46,8 +46,6 @@ case class Settings(
4646

4747
object MainGenericRunner {
4848

49-
val shebangscala: Regex = """#!.*scala""".r
50-
5149
@tailrec
5250
def process(args: List[String], settings: Settings): Settings = args match
5351
case Nil =>
@@ -73,7 +71,7 @@ object MainGenericRunner {
7371
)
7472
case arg :: tail =>
7573
val line = Try(Source.fromFile(arg).getLines.toList).toOption.flatMap(_.headOption)
76-
if arg.endsWith(".scala") || arg.endsWith(".sc") || (line.nonEmpty && shebangscala.matches(line.get)) then
74+
if arg.endsWith(".scala") || arg.endsWith(".sc") || (line.nonEmpty && raw"#!.*scala".r.matches(line.get)) then
7775
settings
7876
.withExecuteMode(ExecuteMode.Script)
7977
.withTargetScript(arg)

0 commit comments

Comments
 (0)