Skip to content

Vulpix will print a compiler crash when it shouldn't #20211

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

Closed
hamzaremmal opened this issue Apr 17, 2024 · 1 comment · Fixed by #20220
Closed

Vulpix will print a compiler crash when it shouldn't #20211

hamzaremmal opened this issue Apr 17, 2024 · 1 comment · Fixed by #20220
Assignees
Labels
area:testing area:vulpix Issues tied with Vulpix, the internal compiler testing framework. itype:bug prio:high
Milestone

Comments

@hamzaremmal
Copy link
Member

Compiler version

Since #20188 was merged

Reproduce

Running testCompilation neg-macros in the scala3-bootstrapped project.

Expectation

Whe testing neg-macros, the content of the checkfiles should not be printed in the terminal. This behaviour not only is wrong, but it can also create some confusion.

@hamzaremmal hamzaremmal added itype:bug prio:high area:testing area:vulpix Issues tied with Vulpix, the internal compiler testing framework. labels Apr 17, 2024
@hamzaremmal
Copy link
Member Author

sbt:scala3-bootstrapped> testCompilation neg-macros
[info] compiling 4 Scala sources to /Users/hamzaremmal/Desktop/LAMP/scala3/compiler/target/scala-3.4.2-RC1/classes ...
[info] compiling 6 Scala sources to /Users/hamzaremmal/Desktop/LAMP/scala3/compiler/target/scala-3.4.2-RC1/classes ...
[info] compiling 4 Scala sources to /Users/hamzaremmal/Desktop/LAMP/scala3/out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/classes ...
[info] compiling 4 Scala sources to /Users/hamzaremmal/Desktop/LAMP/scala3/out/bootstrap/scala3-compiler-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/classes ...
[info] compiling 6 Scala sources to /Users/hamzaremmal/Desktop/LAMP/scala3/out/bootstrap/scala3-compiler-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/classes ...
[info] Test run dotty.tools.dotc.CompilationTests started
[info] Test dotty.tools.dotc.CompilationTests.parallelBackend ignored
[info] Test dotty.tools.dotc.CompilationTests.negAll started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.runAll started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.pickling started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.rewrites started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.pos started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.warn started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.checkInit started
No files matched "neg-macros" in test
No files matched "neg-macros" in test
No files matched "neg-macros" in test
No files matched "neg-macros" in test
No files matched "neg-macros" in test
No files matched "neg-macros" in test
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.posTwice started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.explicitNullsNeg started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.explicitNullsPos started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.explicitNullsRun started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.checkInitGlobal started
No files matched "neg-macros" in test
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.fuzzyAll started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.CompilationTests.genericJavaSignatures started
No files matched "neg-macros" in test

================================================================================
Test Report
================================================================================

0 suites passed, 0 failed, 0 total
[info] Test run dotty.tools.dotc.CompilationTests finished: 0 failed, 1 ignored, 14 total, 2.561s
[info] Test run dotty.tools.dotc.BootstrappedOnlyCompilationTests started
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.negMacros started
[======================>                 ] completed (132/226, 0 failed, 7s)
  exception while retyping new WhateverB.type of class New # -1

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: tests/neg-macros/i17545b/Test_2.scala
        during phase: inlining
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-6a02d49
            settings: -Xcheck-macros true -Xsemanticdb true -Xunchecked-java-output-version 9 -Xverify-signatures true -Ycheck List(all) -Yforce-sbt-phases true -Yno-deep-subtypes true -Yno-double-bindings true -classpath /Users/hamzaremmal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/hamzaremmal/Desktop/LAMP/scala3/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.5.0-RC1-bin-SNAPSHOT.jar:out/compileNegWithCompiler/neg-macros/i17545b -color never -d out/compileNegWithCompiler/neg-macros/i17545b -indent true -pagewidth 120
[=========================>              ] completed (148/226, 0 failed, 7s)
  exception while retyping new WhateverA of class New # -1

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: tests/neg-macros/i17545c/Test_2.scala
        during phase: inlining
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-6a02d49
            settings: -Xcheck-macros true -Xsemanticdb true -Xunchecked-java-output-version 9 -Xverify-signatures true -Ycheck List(all) -Yforce-sbt-phases true -Yno-deep-subtypes true -Yno-double-bindings true -classpath /Users/hamzaremmal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/hamzaremmal/Desktop/LAMP/scala3/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.5.0-RC1-bin-SNAPSHOT.jar:out/compileNegWithCompiler/neg-macros/i17545c -color never -d out/compileNegWithCompiler/neg-macros/i17545c -indent true -pagewidth 120

  exception while retyping new WhateverB of class New # -1

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: tests/neg-macros/i17545d/Test_2.scala
        during phase: inlining
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-6a02d49
            settings: -Xcheck-macros true -Xsemanticdb true -Xunchecked-java-output-version 9 -Xverify-signatures true -Ycheck List(all) -Yforce-sbt-phases true -Yno-deep-subtypes true -Yno-double-bindings true -classpath /Users/hamzaremmal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/hamzaremmal/Desktop/LAMP/scala3/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.5.0-RC1-bin-SNAPSHOT.jar:out/compileNegWithCompiler/neg-macros/i17545d -color never -d out/compileNegWithCompiler/neg-macros/i17545d -indent true -pagewidth 120
[==========================>             ] completed (156/226, 0 failed, 8s)
  exception while retyping @SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @experimental("Added by -experimental") @extendFoo class AFoo()
   extends Foo {} of class TypeDef # -1

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: tests/neg-macros/i18677-a/Test_2.scala
        during phase: inlining
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-6a02d49
            settings: -Xcheck-macros true -Xsemanticdb true -Xunchecked-java-output-version 9 -Xverify-signatures true -Ycheck List(all) -Yforce-sbt-phases true -Yno-deep-subtypes true -Yno-double-bindings true -Yno-experimental true -classpath /Users/hamzaremmal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/hamzaremmal/Desktop/LAMP/scala3/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.5.0-RC1-bin-SNAPSHOT.jar:out/compileNegWithCompiler/neg-macros/i18677-a -color never -d out/compileNegWithCompiler/neg-macros/i18677-a -experimental true -indent true -pagewidth 120
[==============================>         ] completed (178/226, 0 failed, 10s)
  exception while retyping new WhateverA.type of class New # -1

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: tests/neg-macros/i17545a/Test_2.scala
        during phase: inlining
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-6a02d49
            settings: -Xcheck-macros true -Xsemanticdb true -Xunchecked-java-output-version 9 -Xverify-signatures true -Ycheck List(all) -Yforce-sbt-phases true -Yno-deep-subtypes true -Yno-double-bindings true -classpath /Users/hamzaremmal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/hamzaremmal/Desktop/LAMP/scala3/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.5.0-RC1-bin-SNAPSHOT.jar:out/compileNegWithCompiler/neg-macros/i17545a -color never -d out/compileNegWithCompiler/neg-macros/i17545a -indent true -pagewidth 120
[===============================>        ] completed (182/226, 0 failed, 10s)
  exception while retyping @SourceFile("tests/neg-macros/wrong-owner/Test_2.scala") @wrongOwner @experimental class Foo() extends Object() {
  override def toString(): String = "Hello from macro"
} of class TypeDef # -1

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: tests/neg-macros/wrong-owner/Test_2.scala
        during phase: inlining
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-6a02d49
            settings: -Xcheck-macros true -Xsemanticdb true -Xunchecked-java-output-version 9 -Xverify-signatures true -Ycheck List(all) -Yforce-sbt-phases true -Yno-deep-subtypes true -Yno-double-bindings true -classpath /Users/hamzaremmal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/hamzaremmal/Desktop/LAMP/scala3/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.5.0-RC1-bin-SNAPSHOT.jar:out/compileNegWithCompiler/neg-macros/wrong-owner -color never -d out/compileNegWithCompiler/neg-macros/wrong-owner -indent true -pagewidth 120
[=================================>      ] completed (195/226, 0 failed, 11s)
  exception while retyping @SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @experimental("Added by -experimental") @extendFoo class AFoo()
   extends Foo {} of class TypeDef # -1

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Yno-enrich-error-messages.

     while compiling: tests/neg-macros/i18677-b/Test_2.scala
        during phase: inlining
                mode: Mode(ImplicitsEnabled,ReadPositions)
     library version: version 2.13.12
    compiler version: version 3.5.0-RC1-bin-SNAPSHOT-git-6a02d49
            settings: -Xcheck-macros true -Xsemanticdb true -Xunchecked-java-output-version 9 -Xverify-signatures true -Ycheck List(all) -Yforce-sbt-phases true -Yno-deep-subtypes true -Yno-double-bindings true -Yno-experimental true -classpath /Users/hamzaremmal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/hamzaremmal/Desktop/LAMP/scala3/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.5.0-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.5.0-RC1-bin-SNAPSHOT.jar:out/compileNegWithCompiler/neg-macros/i18677-b -color never -d out/compileNegWithCompiler/neg-macros/i18677-b -experimental true -indent true -pagewidth 120
[=======================================>] completed (226/226, 0 failed, 13s)
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.runMacros started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.testPlugins started
No files matched "neg-macros" in test
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.runScala2LibraryFromTasty started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.posWithCompiler started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.posTwiceWithCompiler started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.picklingWithCompiler started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.negWithCompiler started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.posMacros started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.runWithCompiler started
No files matched "neg-macros" in test
[info] Test dotty.tools.dotc.BootstrappedOnlyCompilationTests.runBootstrappedOnly started
No files matched "neg-macros" in test

================================================================================
Test Report
================================================================================

1 suites passed, 0 failed, 1 total
[info] Test run dotty.tools.dotc.BootstrappedOnlyCompilationTests finished: 0 failed, 0 ignored, 11 total, 13.703s
[info] Test run dotty.tools.dotc.coverage.CoverageTests started
[info] Test dotty.tools.dotc.coverage.CoverageTests.checkInstrumentedRuns started
[info] Test dotty.tools.dotc.coverage.CoverageTests.checkCoverageStatements started

================================================================================
Test Report
================================================================================

0 suites passed, 0 failed, 0 total
[info] Test run dotty.tools.dotc.coverage.CoverageTests finished: 0 failed, 0 ignored, 2 total, 0.012s
[info] Passed: Total 27, Failed 0, Errors 0, Passed 27, Ignored 1

@hamzaremmal hamzaremmal linked a pull request Apr 18, 2024 that will close this issue
hamzaremmal added a commit that referenced this issue Apr 18, 2024
@Kordyjan Kordyjan added this to the 3.5.0 milestone May 10, 2024
WojciechMazur added a commit that referenced this issue Jul 6, 2024
Backports #20220 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:testing area:vulpix Issues tied with Vulpix, the internal compiler testing framework. itype:bug prio:high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants