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

Don't swallow exceptions in RuntimeServerTest #6914

Conversation

JaroslavTulach
Copy link
Member

@JaroslavTulach JaroslavTulach commented Jun 1, 2023

Pull Request Description

While working on #6903 I realized that LinkageError from Compiler is silently swallowed by the RuntimeServerTest. Avoiding that by using TeeOutputStream and always printing out to stderr.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Scala,
  • All code has been tested:
    • Unit tests have been written where possible.

@JaroslavTulach JaroslavTulach added CI: No changelog needed Do not require a changelog entry for this PR. --bug Type: bug --data corruption or loss Important: data corruption or loss labels Jun 1, 2023
@JaroslavTulach JaroslavTulach added this to the Design Partners milestone Jun 1, 2023
@JaroslavTulach JaroslavTulach self-assigned this Jun 1, 2023
@JaroslavTulach JaroslavTulach requested a review from Akirathan as a code owner June 1, 2023 05:21
@JaroslavTulach
Copy link
Member Author

JaroslavTulach commented Jun 1, 2023

Simulate the problem with:

enso.$ git diff engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
diff --git engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
index 07e8422865..af067371cb 100644
--- engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
+++ engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
@@ -303,6 +303,7 @@ class IrToTruffle(
             new RuntimeAnnotation(annotation.name, closureRootNode)
           }
           if (!atomCons.isInitialized) {
+            if (true) throw new NoSuchMethodError()
             atomCons.initializeFields(
               language,
               makeSection(moduleScope, atomDefn.location),

and running the RuntimeServerTest.

@JaroslavTulach JaroslavTulach merged commit d511602 into develop Jun 1, 2023
@JaroslavTulach JaroslavTulach deleted the wip/jtulach/DontSwallowExceptionsInRuntimeServerTest_6903 branch June 1, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--bug Type: bug --data corruption or loss Important: data corruption or loss CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants