When I have tried compiling my sources with 3.4.0 - 3.6.2 and source future, I discovered the warning is promoted to error and you can no longer silence it.
Is this intentional? If it is, is it documented somewhere? Or is it just how source future works?
Repro:
scalaVersion := "3.6.2"
name := "Sandbox"
scalacOptions ++= Seq(
"-source", "future",
"-Wconf:msg=Alphanumeric method .* is not declared infix:s",
)
object Main {
extension (a: String) def concat(b: String): String = a + b
def main(args: Array[String]): Unit = {
println("Hello " concat "world")
}
}
Well, thatās the expected behavior. ā-source:featureā basically means āIād like to use the bleading edge, I accept feature/syntax deprecations that might be removed at some unspecified time in the futureā.
If you donāt need it donāt use it. Typically you should rather aim to use exploit minor version which might keep you project source backward compatible with newer version of compiler (best effort), or the next minor version, eg.Scala 3.6 allows to specify ā-source:3.7ā. You can also not specify it at all.
I wanted to quote. I think I pressed ā¦ and then again at the same place, which is delete.
Unfortunately there is no edit action available now.
Thanks, source 3.7 works quite well for me - I do not intend to use it on regular basis, I just want to be confident I am ready for the next version, but without warning me about stuff which is too far away.
That said, I think perhaps Source Compatibility would deserve some maintenance, so that one does not have to hunt through discussions and github issues to get the complete picture?
I noticed that too, the Edit option goes away after a while.
Some kind of āedit spam protectionā?
Not sure what the time limit is.
Itās available at least for the next few minutes after posting (because I do edit often right after posting).
There is discussion here, apparently the default is 2 months.