Skip to content

Migrate to Scala 3.9.0 LTS - #3019

Draft
pierscin wants to merge 3 commits into
masterfrom
scala-3-9-migration
Draft

pierscin wants to merge 3 commits into
masterfrom
scala-3-9-migration

Conversation

@pierscin

@pierscin pierscin commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Needs scala 3.9+ - probably needs new minor version

pierscin and others added 3 commits October 6, 2026 10:47
- defaultCompressionHandlers (fs2, fs2-ce2, http4s, http4s-ce2): use an
  implicit parameter instead of a context bound, as the instance is passed
  explicitly (`defaultCompressionHandlers[F](_: Async[F])`), which since
  Scala 3.6 requires `using` for context bounds
- pekko-http Util.traverseTry: avoid typed patterns in a val definition,
  which no longer type-check
- tests: replace `private[this]` with `private`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Scala 3: 3.3.8 -> 3.9.0
- Scala 3 JVM bytecode target: -java-output-version 11 -> 17 (required by 3.9)
- remove -Yfuture-lazy-vals (rejected by 3.9; new lazy vals are the default)
- silence (Scala 3 only) syntax deprecations for constructs still needed by
  sources shared with Scala 2
- Scala Steward: pin scala3-library to 3.9.x
- docs: Scala 3 requires Java 17+

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the Scala3MigrationWarnings plugin and migrate the sources shared with Scala 2,
which are now compiled with -Xsource:3 on Scala 2:
- `_` -> `?` in types, `with` -> `&` in types, `xs: _*` -> `xs*`
- trailing `f _` eta-expansion -> lambdas / method values
- `var x: T = _` -> explicit initial values
- explicit arguments to implicit parameters -> instances brought into implicit scope
  (restoring the context bound on defaultCompressionHandlers)
- doc snippets updated accordingly
- scalafmt dialect scala213source3

On Scala 2.13, the case-class copy/apply access migration messages (classes with private
constructors) are reported as warnings, keeping the Scala 2 API unchanged. The Scala 2.12
http4s backend tests are compiled without -Xsource:3, as scalac 2.12 overflows the stack there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant