scala3
scala3 copied to clipboard
Bump JLine 3.19.0 -> 3.24.1 & sbt 1.9.7 -> 1.9.9
Fixes #5755, #19704
Tested locally and the difference in behaviour was observed. I'm not sure how to test it with the CI, if anybody has an idea, please let me know. Also, this issue might be a problem sbt/sbt#7177
Tested as follow:
- Observe that the issue in
3.4.1-RC1
scala-cli repl -S 3.4.1-RC1
Welcome to Scala 3.4.1-RC1 (17.0.7, Java Java HotSpot(TM) 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> class π
// defined class π
scala> cclas
-- [E006] Not Found Error: -----------------------------------------------------
1 |clas
|^^^^
|Not found: clas - did you mean caps?
|
| longer explanation available when compiling with `-explain`
1 error found
scala>
- Publish dotty locally with the correct jline version
- Observe that the issue is fixed
scala-cli repl -S 3.4.2-RC1-bin-SNAPSHOT
Welcome to Scala 3.4.2-RC1-bin-SNAPSHOT-git-174d4c6 (17.0.7, Java Java HotSpot(TM) 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> class π
// defined class π
scala> clas
-- [E006] Not Found Error: -----------------------------------------------------
1 |clas
|^^^^
|Not found: clas - did you mean caps?
|
| longer explanation available when compiling with `-explain`
1 error found
scala>
``
Also, this issue might be a problem https://github.com/sbt/sbt/issues/7177
Indeed, this PR breaks the repl command in the Dotty build:
sbt:scala3> repl
...
Welcome to Scala 3.4.2-RC1-bin-SNAPSHOT-nonbootstrapped-git-174d4c6 (17.0.10, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
[error] java.lang.NoSuchMethodError: 'org.jline.utils.AttributedString org.jline.utils.AttributedString.fromAnsi(java.lang.String, java.util.List, java.lang.String, java.lang.String)'
[error] at org.jline.reader.impl.LineReaderImpl.fromAnsi(LineReaderImpl.java:4232)
But the problem goes away if I update project/build.properties to use sbt 1.10.0-M1, since as Eugene observed at https://github.com/sbt/sbt/issues/7498#issuecomment-1954691080 , sbt 1.9.x is on JLine 3.19, whereas the 1.10 series has upgraded to 3.24.1.
Moving Dotty to 1.10.0-M1 seems a bit risky, as it's just a milestone. Maybe we should wait for 1.10.0-RC1 or 1.10.0 final?
In the meantime, I can submit a PR bumping sbt's 1.10.x branch from 3.24.1 to 3.25.1, in the hopes of getting in alignment. (I also plan to upgrade to 3.25.1 in Scala 2.13.14.)
also fixes #19704
whereas the 1.10 series has upgraded to 3.24.1
Breaking news! Eugene has now released sbt 1.9.9 which also upgrades to 3.24.1. So if you add a commit that changes 1.9.7 to 1.9.9 to everywhere, that should fix the repl command and make this PR mergeable.
(At least unless the CI failure is real? It isn't obvious to me whether it is.)
Oh great. I'll bump sbt to 1.9.9 too
Similar test (as described in the above comments) performed in repl with sbt 1.9.9 and scala-cli. It is working fine.
@hamzaremmal we may want to go straight to 3.25.1, because of https://github.com/scala/bug/issues/12957 βΒ it's harmless, but annoying (and people won't be sure it's harmless unless they google for it)
we intend to upgrade to 3.25.1 in Scala 2.13.14 (2.13.13 is on 3.24.1), and presumably sbt will take the upgrade too before too much longer
a 3.24 vs 3.25 mismatch between Scala and sbt is probably okay, but we'll need to test it to be sure
I will bump it to 3.25.1 as soon as #19772 is resolved (to avoid running the CI multiple times)
Additional information for the release note https://github.com/lampepfl/dotty/issues/19704#issuecomment-1964936396