Open bishabosha opened 1 year ago
just got hit by this again when I tried to do a top level import from a library with incompatible tasty version:
$ scala repl -S 3.3.3 --dep io.github.bishabosha::enhanced-string-interpolator:1.0.1
Welcome to Scala 3.3.3 (17, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> import stringmatching.regex.Interpolators.<TAB>
!= ## == asInstanceOf equals getClass hashCode isInstanceOf toString
if I use the 1.0.2
version (which changes nothing except tasty version):
$ scala repl -S 3.3.3 --dep io.github.bishabosha::enhanced-string-interpolator:1.0.2
Welcome to Scala 3.3.3 (17, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> import stringmatching.regex.Interpolators.<TAB>
!= FormatPattern RSStringContext equals isInstanceOf notifyAll toString
## Pattern asInstanceOf getClass ne r unapply
== PatternElement eq hashCode notify synchronized wait
Skimming through, that seems like a not-so-easy issue to fix, so I add the exp:expert
label. Feel free to correct me if I am wrong.
@mbovel is it valid to have both "exp:expert" and "Spree" — like a spree team with an expert — or should "Spree" be removed?
is it valid to have both "exp:expert" and "Spree"
Yes, it's a reminder for me that I should only assign this issue to a team with an experienced contributor.
This issue was picked for the Scala Issue Spree of Monday, November 11th. @dwijnand and @jan-pieter will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.
We have reproduced the issue. We think there are 2 causes:
The result of this combination is that the user doesn't see the error when it happens first during tab completion.
There are 2 possible fixes:
Running completions in the REPL seems to ignore any errors produced by the compiler
Compiler version
3.3.0 (to replicate, though im sure the latest version swallows other kinds of errors)
run the repl with JDK 21 (If you use 3.3.1 im sure there is another error that can be swallowed this way)
Minimized code
in the repl, try running completions on this line
then from now on java.lang.reflect.ClassFileFormatVersion is broken, and no error was printed about the broken class file.
e.g. now mysteriously ClassFileFormatVersion has no members:
Expectation
I expected to see the same error as if I had not done a completion: