-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
REPL: Add compiler options to :reset #14139
Conversation
e8b973c
to
a43cf75
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should these be revived? removed?
tests/disabled/partest/run/repl-reset.check:scala> :reset
tests/disabled/partest/run/repl-reset.scala: |:reset
tests/disabled/partest/run/t7747-repl.check:scala> :reset
tests/disabled/partest/run/t7747-repl.scala: |:reset
@@ -110,7 +111,7 @@ case object Help extends Command { | |||
|:type <expression> evaluate the type of the given expression | |||
|:doc <expression> print the documentation for the given expression | |||
|:imports show import history | |||
|:reset reset the repl to its initial state, forgetting all session entries | |||
|:reset [options] reset the repl to its initial state, forgetting all session entries | |||
|:settings <options> update compiler options, if possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I think you meant angle brackets here, like the other entries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a type parameter, not an index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied Scala 2. And I think I kind of grok the logic there to be <options>
for settings, because it's expected to get options, even though it actually accepts none as a way to print options... While for :reset (and :replay in the scala 2 repl) passing options is more of an extra, so more... optional (🥁 !)
Or we can deviate to fix it to some standard. I just looked at http://docopt.org/ before realising I wasn't following that here, I was following what Scala 2 had.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think it should follow docopt, but it's not a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is docopt like Coptic?
a43cf75
to
11b9e3c
Compare
11b9e3c
to
4902a68
Compare
The main impl landed in #14140. |
An easy change that makes it match Scala 2's REPL.