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

Runner: Fix Scala.js linking error #120

Merged
merged 1 commit into from
May 1, 2020

Conversation

tindzk
Copy link
Contributor

@tindzk tindzk commented May 1, 2020

When the libraries scalajs-test-interface and scalajs-junit-test-runtime are placed before MUnit in the classpath, the following linking error occurs:

org.junit.runner.Runner (of kind Class) is not a valid interface
implemented by munit.MUnitRunner (of kind Class)

Solve this by defining an abstract class instead of a trait to match JUnit's Runner.

See also #114.

When the libraries `scalajs-test-interface` and
`scalajs-junit-test-runtime` are placed before MUnit in the
classpath, the following linking error occurs:

```
org.junit.runner.Runner (of kind Class) is not a valid interface
implemented by munit.MUnitRunner (of kind Class)
```

Solve this by defining an `abstract class` instead of a `trait` to
match JUnit's [`Runner`](https://junit.org/junit4/javadoc/4.12/org/junit/runner/Runner.html).

See also scalameta#114.
@tindzk tindzk mentioned this pull request May 1, 2020
Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thank you for verifying this fixes the issue!

@olafurpg olafurpg merged commit 26048dd into scalameta:master May 1, 2020
@tindzk tindzk deleted the bug/classpath-ordering branch May 1, 2020 19:36
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