From 451096bc8b1b0645606d6dff16807aeebafc6d80 Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Tue, 29 Sep 2026 11:36:04 +0200 Subject: [PATCH 1/2] Add `-deprecation` and `-Werror` compiler settings --- build.mill | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.mill b/build.mill index ea961b3..27a28d6 100644 --- a/build.mill +++ b/build.mill @@ -55,7 +55,7 @@ trait JavaMainClassNativeImage extends NativeImage { trait JavaClassNameModule extends ScalaModule with ScalafixModule { override def scalacOptions: T[Seq[String]] = - super.scalacOptions() ++ Seq("-Wunused:all") + super.scalacOptions() ++ Seq("-Wunused:all", "-deprecation", "-Werror") override def scalaVersion: T[String] = Versions.scala } From 77e454155dc9f2f046a53d69ff8b6d8798ab358e Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Tue, 29 Sep 2026 11:40:29 +0200 Subject: [PATCH 2/2] Add `-Yfuture-lazy-vals` and `-java-output-version:17` --- build.mill | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.mill b/build.mill index 27a28d6..0d30e64 100644 --- a/build.mill +++ b/build.mill @@ -54,8 +54,10 @@ trait JavaMainClassNativeImage extends NativeImage { } trait JavaClassNameModule extends ScalaModule with ScalafixModule { + private val futureLazyValOpts = Seq("-Yfuture-lazy-vals", "-java-output-version:17") + override def scalacOptions: T[Seq[String]] = - super.scalacOptions() ++ Seq("-Wunused:all", "-deprecation", "-Werror") + super.scalacOptions() ++ Seq("-Wunused:all", "-deprecation", "-Werror") ++ futureLazyValOpts override def scalaVersion: T[String] = Versions.scala }