There are enough differences in features between 17 and 21 (virtual threads) and 21 and 25 (synchronized blocks not a footgun for virtual threads, better views of memory as data via FFM) that it makes sense for Scala libraries to pin a more recent JVM version than scastie offers. Even if this isn't auto-detected from imports, it should be available as a dropdown.
This would also probably fix #476 adequately.
Possible workaround: I have not checked whether the scala-cli header directive for JVM version works on scastie. However, even if it does, that would require one to use the more-fiddly scala-cli interface. scastie shines the most when it directly runs your code without clutter.
There are enough differences in features between 17 and 21 (virtual threads) and 21 and 25 (synchronized blocks not a footgun for virtual threads, better views of memory as data via FFM) that it makes sense for Scala libraries to pin a more recent JVM version than scastie offers. Even if this isn't auto-detected from imports, it should be available as a dropdown.
This would also probably fix #476 adequately.
Possible workaround: I have not checked whether the scala-cli header directive for JVM version works on scastie. However, even if it does, that would require one to use the more-fiddly scala-cli interface. scastie shines the most when it directly runs your code without clutter.