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.
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: