Skip to content

REPL: JLine 3: bring back -Xnojline, but deprecate it #8906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

SethTisue
Copy link
Member

instead, -Xjline:off is now recommended

fixes scala/scala-dev#694

instead, `-Xjline:off` is now recommended

fixes scala/scala-dev#694
@scala-jenkins scala-jenkins added this to the 2.13.3 milestone Apr 22, 2020
@SethTisue SethTisue requested review from som-snytt and lrytz April 22, 2020 04:21
@SethTisue SethTisue modified the milestones: 2.13.3, 2.13.2 Apr 22, 2020
@SethTisue SethTisue added the tool:REPL Changes to the Scala REPL shell label Apr 22, 2020
@SethTisue
Copy link
Member Author

the deprecation doesn't actually cause a warning to be printed when the REPL starts, so that part is mostly an empty gesture, but it's still worth doing to keep it from showing up on the compiler options doc page, I think

Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd swear Grigolo as Cavaradossi just looked at Scarpia and they went, Don't make me laugh!, for a second. Now Yoncheva's Floria ("Flo") Tosca has just arrived at Scarpia's.

As with Scarpia, I can't really approve.

@lrytz lrytz merged commit 8de6e34 into scala:2.13.x Apr 22, 2020
@dwijnand
Copy link
Member

the deprecation doesn't actually cause a warning to be printed when the REPL starts, so that part is mostly an empty gesture, but it's still worth doing to keep it from showing up on the compiler options doc page, I think

I feel like that should change, no? How many other warnings are we/users not seeing?

@dwijnand
Copy link
Member

dwijnand commented Apr 22, 2020

Another example:

$ scala -2.13.head -deprecation -Xsource:2.14 -e 'class C'
warning: -Xsource is deprecated: instead of -Xsource:2.14, use -Xsource:3

$ scala -2.13.head -deprecation -Xsource:2.14
Welcome to Scala 2.13.2-bin-8de6e34 (OpenJDK 64-Bit Server VM, Java 11.0.6).
Type in expressions for evaluation. Or try :help.

scala>

(edit: that warning message isn't the best, I just realised.)

@lrytz
Copy link
Member

lrytz commented Apr 22, 2020

If I remember correctly, deprecation warnings for compiler flags are printed at the end of the compiler Run, so in the repl they would be printed after each line. I guess that's why they were disabled, we could instead print them after the repl initialization.

@dwijnand
Copy link
Member

Oh, yeah:

$ scala -2.13.head -deprecation -Xsource:2.14
Welcome to Scala 2.13.2-bin-8de6e34 (OpenJDK 64-Bit Server VM, Java 11.0.6).
Type in expressions for evaluation. Or try :help.

scala> 1
warning: -Xsource is deprecated: instead of -Xsource:2.14, use -Xsource:3
val res0: Int = 1

scala>
:quit
$ scala -2.13.head -Xnojline -deprecation
Welcome to Scala 2.13.2-bin-8de6e34 (OpenJDK 64-Bit Server VM, Java 11.0.6).
Type in expressions for evaluation. Or try :help.

scala> 1
warning: -Xnojline is deprecated: Replaced by -Xjline:off
val res0: Int = 1

scala> :quit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool:REPL Changes to the Scala REPL shell
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JLine 3: keep -Xnojline as a deprecated alias for -Xjline:off, perhaps
5 participants