Skip to content

Make RunnableSuite JVM-specific#307

Draft
zainab-ali wants to merge 1 commit intotypelevel:mainfrom
zainab-ali:junit-cleanup
Draft

Make RunnableSuite JVM-specific#307
zainab-ali wants to merge 1 commit intotypelevel:mainfrom
zainab-ali:junit-cleanup

Conversation

@zainab-ali
Copy link
Copy Markdown
Contributor

The RunnableSuite class is used to integrate with JUnit. It provides:

  • A plan function, for creating a list of tests to run
  • A runUnsafe function for running tests, only used in JUnit
  • The RunWith annotation linking it to the WeaverRunner.

It is currently shared across all platforms, but is only required for the JVM.

This introduces some redundancies in the JS and Native implementations. As an example, unsafeRunSync is only needed in the JVM implementation, but needs to be implemented for JS and Native.

This PR moves RunnableSuite into the jvm sources. Suites that extend RunnableSuite (SharedResourceSuite and DisciplineFSuite) have corresponding Compat traits that either extend RunnableSuite or EffectSuite.

@zainab-ali zainab-ali force-pushed the junit-cleanup branch 2 times, most recently from 80d5a28 to dba641f Compare April 20, 2026 17:24
def spec(args: List[String]): Stream[F, TestOutcome]
}

@RunWith(classOf[weaver.junit.WeaverRunner])
Copy link
Copy Markdown
Contributor Author

@zainab-ali zainab-ali Apr 20, 2026

Choose a reason for hiding this comment

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

This diff is hard to read, but the changes are as follows:

  • The analyze function has been moved from RunnableSuite to SharedResourceSuite. This is private to weaver.
  • The public isCI function has been moved to SharedResourceSuite. Users of DisciplineFSuite that are calling isCI(assuming there are any) will have to implement their own isCI function. Arguably, this shouldn't be part of the public API in the first place.
  • The RunnableSuite has been moved into JVM sources. Users who refer to RunnableSuite in cross-platform builds should refer to EffectSuite instead.

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.

1 participant