Closed mbland closed 1 month ago
It started to fail in Scala 3.5 because in this minor release we've added a def initialize(settings: List[String])(using Context)
to replace def init(settings: List[String])
. By having an additional context parameter we use reporter to correctly report warnings/errors, eg. when parsing passed settings. It was introduced in https://github.com/scala/scala3/pull/20330
Because of this change def init
needs to use override
modifier explicitly. It's a good practice to have it also when overriding abstract methods.
Probably an additional @nowarn("deprecation")
annotation should be added to the init method, because now it would report that we should use initialize
instead.
@WojciechMazur Thanks for the explanation! Not having one was bugging me. Now this loop feels closed.
Description
Avoids a future Scala 3.5 compatibility issue under Bzlmod. Part of #1482.
Motivation
PR #1604 added Scala 3.5 suppport. I updated my Bzlmod working branch to include those changes, and updated
scala_3_5.bzl
with dependencies I'd added or updated fromscala_3_4.bzl
../test_examples.sh
then failed with the following error, which I recreated in the localexamples/scala3
repo:This may be because I bumped
io_bazel_rules_scala_scala_library_2
fromorg.scala-lang:scala-library:2.13.12
to 2.13.14 in my Bzlmod branch. That's my guess based on information about thedotty
packages from the following files:third_party/utils/src/test/io/bazel/rulesscala/utils/Scala3CompilerUtils.scala
third_party/dependency_analyzer/src/test/analyzer_test_scala_3.bzl
It's interesting that Scala 3.{1,2,3,4} all passed with that
scala-library
version bump, but without this change, but I can't explain why.