Skip to content

Cross build laika-sbt for sbt 2#774

Open
tanishiking wants to merge 1 commit into
typelevel:mainfrom
tanishiking:sbt2
Open

Cross build laika-sbt for sbt 2#774
tanishiking wants to merge 1 commit into
typelevel:mainfrom
tanishiking:sbt2

Conversation

@tanishiking

@tanishiking tanishiking commented Jun 25, 2026

Copy link
Copy Markdown

Depends on upstream sbt change sbt/sbt#9377, we need to wait until sbt 2.0.1 2.0.1 is released with that fix.


close #773

  • Exclude all laika-sbt tasks from sbt 2 caching with Def.uncached.
  • Adapt to sbt2 API changes using https://github.com/sbt/sbt2-compat if you don't like adding dependency, we can define small set of PluginCompat.
  • Run the plugin build and tests in CI with sbt 2, Scala 3, and Java 17.
  • Set Laika / target explicitly in each scripted project build.sbt so scripted tests work across sbt 1 and 2 target directory.

Depends on upstream sbt change sbt/sbt#9377

@tanishiking tanishiking changed the title [WIP] Cross build laika-sbt for sbt 2 Cross build laika-sbt for sbt 2 Jun 29, 2026
logLevel = MessageFilter.Warning
)

private def unapply(conf: LaikaConfig) = conf

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

unused, removed for suppress warning in Scala3.

Laika / clean := Tasks.clean.value,
laikaSite / mappings := Def.sequential(Tasks.site, Tasks.mappings).value
) :+ (cleanFiles += (Laika / target).value)
@nowarn("msg=unused import")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

For sbtcompat.PluginCompat.* in Scala3.

fix typelevel#773

- Exclude all laika-sbt tasks from sbt 2 caching with `Def.uncached`.
- Adapt to sbt2 API changes using https://github.com/sbt/sbt2-compat
  if you don't like adding dependency, we can define small set of
  PluginCompat.
- Run the plugin build and tests in CI with sbt 2, Scala 3, and Java 17.
- Set `Laika / target` explicitly in each scripted project `build.sbt` so
  scripted tests work across sbt 1 and 2 target directory.

Depends on upstream sbt change sbt/sbt#9377
@tanishiking tanishiking marked this pull request as ready for review June 29, 2026 08:41
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.

sbt 2.x support for laika-sbt

1 participant