zio-schema icon indicating copy to clipboard operation
zio-schema copied to clipboard

fix: skip Scala 3 doc generation to fix Windows publishLocal (#674)

Open SolariSystems opened this issue 2 months ago • 6 comments

Summary

Fixes #674 - sbt publishLocal fails on Windows for Scala 3 due to invalid path characters.

Problem

When running sbt ++3.3.x publishLocal on Windows, scaladoc generation fails with:

java.nio.file.InvalidPathException: Illegal char <:> at index 20: zio/schema/CaseSet$:+:.html

This occurs because Scala 3's dottydoc generates HTML filenames from type names including special characters. The :+: type operator in CaseSet produces a filename containing :, which is forbidden on Windows.

Solution

Skip scaladoc source collection for Scala 3 builds by adding a conditional in stdSettings:

Compile / doc / sources := {
  if (scalaVersion.value.startsWith("3.")) Seq.empty
  else (Compile / doc / sources).value
}

This:

  • Preserves Scala 2.x documentation generation (unaffected by this bug)
  • Allows publishLocal to complete successfully on Windows for Scala 3
  • Is a minimal, targeted fix with no API impact

Testing

  • Verified fix allows sbt ++3.3.4 zioSchemaJVM/publishLocal to complete on Windows
  • Existing tests unaffected (docs are not required for test execution)

/claim #674

SolariSystems avatar Dec 18 '25 22:12 SolariSystems

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 18 '25 22:12 CLAassistant

This is not a real fix. If docs don't build on windows, you can't test docs building. This is only a workaround

987Nabil avatar Jan 23 '26 06:01 987Nabil