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

Update to munit 1.0.0-M6 #210

Merged
merged 6 commits into from
Aug 3, 2022
Merged

Update to munit 1.0.0-M6 #210

merged 6 commits into from
Aug 3, 2022

Conversation

armanbilge
Copy link
Member

Yoloing, let's see what CI says :)

Comment on lines 99 to 100
case _: InvocationTargetException | _: ExceptionInInitializerError |
_: UndeclaredThrowableException | _: ExecutionException if x.getCause != null =>
// should also include InvocationTargetException and UndeclaredThrowableException, but not on SJS
case _: ExceptionInInitializerError | _: ExecutionException if x.getCause != null =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These exceptions don't link for Scala.js. I'm not sure how much they matter. If anyone JVM-side complains we can always split this code cross-platform or something /shrug

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the PR that fixed this was observing an ExecutionException

@armanbilge armanbilge changed the title Update to munit 1.0.0-M5 Update to munit 1.0.0-M6 Jun 28, 2022
@armanbilge armanbilge closed this Jun 28, 2022
@armanbilge armanbilge reopened this Jun 28, 2022
Comment on lines -96 to -103
// https://github.com/scalameta/munit/blob/68c2d13868baec9a77384f11f97505ecc0ce3eba/munit/shared/src/main/scala/munit/MUnitRunner.scala#L318-L326
@tailrec
private def rootCause(x: Throwable): Throwable = x match {
case _: InvocationTargetException | _: ExceptionInInitializerError |
_: UndeclaredThrowableException | _: ExecutionException if x.getCause != null =>
rootCause(x.getCause)
case _ => x
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now a public method in MUnit.

@armanbilge armanbilge requested a review from valencik August 2, 2022 16:07
Copy link
Member

@valencik valencik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Yay deleted code :)

@armanbilge armanbilge merged commit 3e4369b into typelevel:main Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants