Replace sbt-crossproject with sbt-projectmatrix - #918
Draft
zainab-ali wants to merge 1 commit into
Draft
Conversation
zainab-ali
force-pushed
the
project-matrix
branch
2 times, most recently
from
August 12, 2026 16:34
10e04b4 to
cc325a8
Compare
zainab-ali
force-pushed
the
project-matrix
branch
from
August 12, 2026 17:01
cc325a8 to
2172e0f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a POC for replacing cross project with project matrix.
Exactly how it should be incorporated is up for discussion. For example, we could support different plugins for cross project and project matrix for SBT 1, or only support project matrix for SBT 2.0.
Status
It compiles and publishes locally, and works for itself (the sbt-typelevel build) and weaver. It needs to be tested on many other projects. Note that the GitHub actions pipeline can't be tested in other projects until a snapshot is published.
API changes
Users will need to rewrite their builds to use projectMatrix. The actual API surface of sbt-typelevel is mostly the same. The main changes are:
-
CrossRootProjectneeds a list of scala versions to be passed to it.CrossRootProject.aggregatefunction must be passedProjectMatrixcomposite projects. For non-matrix projects, theaggregatefunction needs to be given a specific scala version. This is because a project definition doesn't contain enough information to determine its scala version.TypelevelBspPluginusesPlatformAxisinstead of cross project'sPlatformtype.++ {{ matrix.scala }}in generated workflows has been replaced with a scala version suffix.