Skip to content

Use Scala Native test-interface-sbt-defs instead of test-interface#328

Merged
zainab-ali merged 1 commit into
typelevel:mainfrom
zainab-ali:scala-native-test-interface
May 29, 2026
Merged

Use Scala Native test-interface-sbt-defs instead of test-interface#328
zainab-ali merged 1 commit into
typelevel:mainfrom
zainab-ali:scala-native-test-interface

Conversation

@zainab-ali
Copy link
Copy Markdown
Collaborator

@zainab-ali zainab-ali commented May 28, 2026

See scala-native/scala-native#4844

Testing libraries and frameworks should depend on Scala Native's test-interface-sbt-defs, not test-interface.

  • test-interface-sbt-defs defines a common interface for unit tests. It follows early-semver versioning.
  • test-interface is a server implementation that must match the version of the Scala Native plugin. It follows strict versioning.

This was picked up by SBT 1.12.10, which added eviction checks for test dependencies.

How to reproduce

Create an SBT project with the following:

// project/build.properties
sbt.version = 1.12.11
// project/plugins.sbt
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.11")
// build.sbt
scalaVersion := "3.3.7"
enablePlugins(ScalaNativePlugin)

ThisBuild / evictionWarningOptions := (ThisBuild / evictionWarningOptions).value
  .withConfigurations(List(Compile, Test))

libraryDependencies += "org.typelevel" %%% "weaver-cats" % "0.12.0" % Test

The sbt update command gives:

[error] (update) found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[error]
[error] 	* org.scala-native:test-interface_native0.5_3:0.5.11 (strict) is selected over 0.5.10 for test
[error] 	    +- default:scala-native-seed-project_native0.5_3:0.1.0-SNAPSHOT (depends on 0.5.11)
[error] 	    +- org.typelevel:weaver-framework_native0.5_3:0.12.0  (depends on 0.5.10)

@zainab-ali zainab-ali marked this pull request as ready for review May 28, 2026 14:07
@zainab-ali zainab-ali changed the title Depend on test-interface-sbt-defs. Use Scala Native test-interface-sbt-defs instead of test-interface May 28, 2026
@zainab-ali zainab-ali merged commit c9bd1d7 into typelevel:main May 29, 2026
13 checks passed
@zainab-ali zainab-ali deleted the scala-native-test-interface branch May 29, 2026 14:04
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