Sbt 2 production-ready roadmap


This thread is part of the projects covered by Sovereign Tech Fund’s investment in Scala.

For the full context, please read the announcement blog post: The Sovereign Tech Fund invests in Scala | The Scala Programming Language

On this forum, each project supported through this investment has its own dedicated thread.

This thread covers sbt 2 migration effort project and will be used to share the project overview, a roadmap with key milestones, ongoing progress updates, and opportunities to engage—so we can hear ideas from the community and encourage contributions.


As part of the Sovereign Tech Agency program, we are working on sbt a goal to bring sbt 2 release behind the finish line and make it reliable and production-ready.

The scope of work is:

  • Prepare and ship a stable sbt 2 release, fixing any blocker issues.
  • Migrate ecosystem projects builds from sbt 1 to sbt 2 to encourage the wider migration effort and stress-test the release.
  • Post-release maintenance, fixing any critical issues discovered in the process of migration.
  • Update essential sbt 1 plugins to support sbt 2

This thread is for:

  • Migration pain points
  • Reports from sbt 2 early adopters adopters
  • Plugin maintainer coordination
  • Ecosystem-level issues that deserve priority

The goal of the project is to spearhead the migration of the Scala ecosystem of libraries and sbt plugins to sbt 2 - but certainly there is so many more projects out there than this project can cover. Therefore, we encourage the ecosystem maintainers to migrate their builds and projects to sbt 2. We can use this thread for migration experiences exchange, prompt detection of critical issues and streamlining of migration process.

Stay tuned for the updates on the work progress here!

11 Likes

Not sure how up to date this page is:
sbt 2.x plugin migration · sbt/sbt Wiki · GitHub
But scala js and scala-native support missing are currently my first step blockers for trying out sbt 2. At least they were missing last time I tried, and the page above has not changed for them since.

2 Likes

I’m going to work on Scala Native sbt 2 plugin this week. I was, and I’m still waiting for mima-plugin (I can see PR was merged, but no new release), however it probably it’s not required to be published just to enable cross-compilation

11 Likes

As part of this program, I’ve started working on the Scala.js sbt2 plugin migration: https://github.com/scala-js/scala-js/pull/5314

I haven’t tested it with any serious projects yet, but I’ve at least succeeded in getting many of the scripted tests to pass on sbt2! :slight_smile:

12 Likes

sbt 2.x support was merged for Scala Native, and is currently available in the nightlies (first version is 0.5.11-20260208-6024c6e-SNAPSHOT) We’ve identified some issues (e.g. sbt/sbt#8665) in the sbt itself, these were fixed and would be available in sbt 2.0.0-RC9

7 Likes

My next stumbling point would be cross building documentation for jvm/native.
The doc says nothing yet:

sbt crossproject is not supported, and I assume superseded by the in sourced projectmatrix?
but sbt projectmatrix doc says native is not supported

I tried anyways and got an exception:
java.lang.RuntimeException: no rows were found in rdts matching ProjectRow(true, List(PlatformAxis(native,Native,native), ScalaVersionAxis(3.8.1,3))): List()

So helpful answers for further testing would be:
• Is projectmatrix now the assumed way? Should this already work, or do I need to wait. If so, what would be an example setup, specifically, for multiple modules depending on each other.

It’s clearly a missing/scattered documentation issue:

  • sbt-projectmatrix mention that it got archived because, it got “sourced into sbt 2.0”. sbt has it mentioned… as a very short ticket. It’s mentioned in a few placed I think, but not with any great announcement
  • I migrated all my projects from sbt-crossproject to sbt-projectmatrix and I use it for Scala.js/Scala Native as well, so I can confirm first hand that it work
  • however I am also using sbt-commandmatrix and I think its builder is what helps me avoid seeing your missing rows errors

There is a need for some documentation for this feature, a guide how to migrate from sbt-crossproject, common pitfalls and how to avoid them, etc.