Skip to content

Enable -Yfuture-lazy-vals for Scala 3.3.x - #653

Merged
lrytz merged 2 commits into
scala:mainfrom
Philippus:enable-future-lazy-vals
Sep 4, 2026
Merged

Enable -Yfuture-lazy-vals for Scala 3.3.x#653
lrytz merged 2 commits into
scala:mainfrom
Philippus:enable-future-lazy-vals

Conversation

@Philippus

@Philippus Philippus commented Sep 3, 2026

Copy link
Copy Markdown
Member

Applying this PR will enable -Y-future-lazy-vals for Scala 3.3.x. This does mean that we can no longer target java 8 for Scala 3. I've chosen to target java 17. Fixes #648.

@Philippus
Philippus force-pushed the enable-future-lazy-vals branch from 3d937e8 to 333b69b Compare September 3, 2026 13:49
Comment thread build.sbt Outdated
versionPolicyIntention := (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => Compatibility.None
case _ => Compatibility.BinaryAndSourceCompatible
}),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Needed because of:

[error] You have to relax our compatibility intention by changing the value of versionPolicyIntention, or to fix the incompatibilities.
[error] We found the following incompatibilities:
[error]    * static method <clinit>()Unit in object scala.util.parsing.input.OffsetPosition does not have a correspondent in current version
[error]      filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("scala.util.parsing.input.OffsetPosition.<clinit>")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is due to scala-garden/mima#794 (i just fixed it in MiMa, but it's not yet released). I added a MiMa filter instead.

@lrytz
lrytz force-pushed the enable-future-lazy-vals branch from 333b69b to 96a67ce Compare September 4, 2026 08:41
@lrytz

lrytz commented Sep 4, 2026

Copy link
Copy Markdown
Member

aligned more with scala/scala-xml#833

@lrytz

lrytz commented Sep 4, 2026

Copy link
Copy Markdown
Member

I removed the javacOptions --release N because we're using the corresponding Java version anyway (and there are no java sources anyway).

@lrytz
lrytz merged commit 7a1693f into scala:main Sep 4, 2026
26 of 27 checks passed
@Philippus
Philippus deleted the enable-future-lazy-vals branch September 6, 2026 09:12
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.

Support Java 25 without warnings

2 participants