scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 15 forks source link

REPL: `scala` task in scala/scala repo broken in recent sbt versions #755

Open SethTisue opened 3 years ago

SethTisue commented 3 years ago

the usual workaround is dist/mkQuick, then go out to the shell and ./build/quick/bin/scala

of course you can also publishLocal and then use the published version from sbt or scala-cli or whatever

~Dotty is in the same boat~ (not anymore)

see https://github.com/sbt/sbt/pull/6185

there is a suggestion in 6185 I can try to see if it helps

UPDATE: in February 2024 we merged a PR that greatly improved the situation, but things aren't always quite right yet; see below

SethTisue commented 3 years ago

The current status on 2.13.x is that it works but without most JLine features.

You get:

WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)

That's with sbt 1.4.9, and the situation is the same with 1.5.0-RC1.

That's tons better than "doesn't work", but still tons worse than actually fully working.

See also the inconclusive experiment/discussion at https://github.com/scala/scala/pull/9380

SethTisue commented 2 years ago

unassigning myself since I don't seem sufficiently motivated to dig into it

SethTisue commented 8 months ago

The current status on 2.13.x is that it works but without most JLine features.

I thought upgrading to sbt 1.10.0-M1 might fix that, since sbt version upgrades their own JLine from 3.19 to 3.24.1... but no, it doesn't help.

SethTisue commented 8 months ago

https://github.com/jline/jline3/commit/d4bf37c75641b6a1d10135611b169d555e0b9e55 suggests that-Dorg.jline.terminal.output=forced-out might help

SethTisue commented 8 months ago

scala/scala#10695 does hugely improve the situation, but I notice that paren and brace matching is messed up — when you type the closing brace, both braces disappear 😭

so I think the ticket should remain open even after we merge that PR

som-snytt commented 8 months ago

Braceless syntax arrives in Scala 2.

som-snytt commented 8 months ago

Another fine reason not to mention tickets in commits. They act at a distance.

joroKr21 commented 8 months ago

What the hell happened? 🤔

joroKr21 commented 8 months ago

Ahh, rebase and push to my fork?

Jasper-M commented 8 months ago

Braceless syntax arrives in Scala 2.

Better brace ourselves.

SethTisue commented 7 months ago

upgrading JLine from 3.24.1 to 3.25.1 in Scala 2 itself (https://github.com/scala/scala/pull/10717) did not improve the situation in my testing, but it's conceivable that once https://github.com/sbt/sbt/pull/7500 also lands something might change 🤷

som-snytt commented 7 months ago

image