Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly Dotty workflow of 2022-01-24 failed #14332

Closed
github-actions bot opened this issue Jan 24, 2022 · 8 comments · Fixed by #14336
Closed

Nightly Dotty workflow of 2022-01-24 failed #14332

github-actions bot opened this issue Jan 24, 2022 · 8 comments · Fixed by #14336

Comments

@github-actions
Copy link
Contributor

See https://github.com/lampepfl/dotty/actions/runs/1737834571

@som-snytt
Copy link
Contributor

Duplicates the failures earlier at #13367 which I assumed to be spurious because everything else was green and this passed locally. Though frankly, still difficult to know the canonical way to run a given test. I re-read the contributing page to little avail.

[info] Test dotty.tools.repl.ScriptedTests.replTests started
expected =========>
// scalac: -source:future -deprecation
scala> type M[X] = X match { case Int => String case _ => Int }
1 warning found
-- Deprecation Warning: --------------------------------------------------------
1 | type M[X] = X match { case Int => String case _ => Int }
  |                                               ^
  |        `_` is deprecated for wildcard arguments of types: use `?` instead
scala> type N[X] = X match { case List[_] => Int }
1 warning found
-- Deprecation Warning: --------------------------------------------------------
1 | type N[X] = X match { case List[_] => Int }
  |                                 ^
  |        `_` is deprecated for wildcard arguments of types: use `?` instead
actual ===========>
// scalac: -source:future -deprecation
scala> type M[X] = X match { case Int => String case _ => Int }
scala> type N[X] = X match { case List[_] => Int }
1 warning found
-- Deprecation Warning: --------------------------------------------------------
1 | type N[X] = X match { case List[_] => Int }
  |                                 ^
  |        `_` is deprecated for wildcard arguments of types: use `?` instead
Error:  Test dotty.tools.repl.ScriptedTests.replTests failed: java.lang.AssertionError: Error in script /__w/dotty/dotty/out/bootstrap/scala3-compiler-bootstrapped/scala-3.1.2-RC1-bin-SNAPSHOT-nonbootstrapped/test-classes/repl/i13208.scala, expected output did not match actual, took 8.573 sec
Error:      at dotty.tools.repl.ReplTest.testScript(ReplTest.scala:97)
Error:      at dotty.tools.repl.ReplTest.testFile(ReplTest.scala:42)
Error:      at dotty.tools.repl.ScriptedTests.replTests$$anonfun$1(ScriptedTests.scala:11)
Error:      at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
Error:      at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
Error:      at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1328)
Error:      at dotty.tools.repl.ScriptedTests.replTests(ScriptedTests.scala:11)
Error:      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
Error:      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error:      at java.lang.reflect.Method.invoke(Method.java:567)
Error:      ...

Probably this was meant to be a failed test, where the embedded source string does not compile:

[info] Test dotty.tools.scripting.ExpressionTest.verifyImports started
bashCmd: /bin/bash -c "bin/scala -e 'import java.nio.file.Paths;val cwd = Paths.get(""."");println(cwd.toFile.listFiles.toList.filter(_.isDirectory).size)'"
stdout:
stderr:
-- [E040] Syntax Error: compileFromString-0e84674d-0988-4706-ada1-b683ae96c4d2..scala:2:52 -----------------------------------------------------
2 |  import java.nio.file.Paths;val cwd = Paths.get(""."");println(cwd.toFile.listFiles.toList.filter(_.isDirectory).size)
  |                                                    ^
  |                                                    an identifier expected, but string literal found
Exception in thread "main" dotty.tools.scripting.StringDriverException: Errors encountered during compilation
        at dotty.tools.scripting.StringDriverException$.apply(StringDriver.scala:45)
        at dotty.tools.scripting.StringDriver.compileAndRun(StringDriver.scala:27)
        at dotty.tools.MainGenericRunner$.run$1(MainGenericRunner.scala:256)
        at dotty.tools.MainGenericRunner$.main(MainGenericRunner.scala:266)
        at dotty.tools.MainGenericRunner.main(MainGenericRunner.scala)

@som-snytt
Copy link
Contributor

Maybe the test run of the breaking merge is green because it ran on

succeeded on Nov 18, 2021 

@nicolasstucki
Copy link
Contributor

741e17e is the first commit where there is no warning in

type M[X] = X match { case Int => String case _ => Int }

@nicolasstucki
Copy link
Contributor

741e17e commit was merged in #12261

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Jan 24, 2022
The warning was removed in scala#12261

Fixes scala#14332
@som-snytt
Copy link
Contributor

@philwalk see the ExpressionTest output quoted in my comment. There are extra quotes in ""."".

@philwalk
Copy link
Contributor

@philwalk see the ExpressionTest output quoted in my comment. There are extra quotes in ""."".

Sorry for the delay responding, I'll look into it.

@philwalk
Copy link
Contributor

I have a fix for @test dotty.tools.scripting.ExpressionTest#verifyImports
It was missing an assert, so the compile error didn't cause a failed test.
Should this be a new PR? or is there some other way to incorporate the changes to ExpressionTest.scala?

@som-snytt
Copy link
Contributor

@philwalk in the sense that committed PRs are done deals unless reverted, the usual course is just to look to the future and open new PRs. I'm curious to see if the test was supposed to fail, it's a cliff-hanger!

Xavientois pushed a commit to Xavientois/dotty that referenced this issue Feb 2, 2022
olsdavis pushed a commit to olsdavis/dotty that referenced this issue Apr 4, 2022
The warning was removed in scala#12261

Fixes scala#14332
olsdavis pushed a commit to olsdavis/dotty that referenced this issue Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants