Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

REPL retry to replay failed inputs #220

Closed
som-snytt opened this issue Jun 12, 2021 · 3 comments
Closed

REPL retry to replay failed inputs #220

som-snytt opened this issue Jun 12, 2021 · 3 comments

Comments

@som-snytt
Copy link

If REPL gets :replay, please add :retry to replay failed inputs.

This is a Scala 2 example, but the idea is that a line doesn't compile with current options, and I'd like to retry it with different options. There are probably good Scala 3 examples with different -source settings.

scala> {
     | 1
     | +
     | 2
     | }
       +
       ^
On line 3: error: not found: value +

scala> :replay -Xsource:3
Nothing to replay.
@SethTisue
Copy link

Note that we don't have :settings in Scala 3 (as per #131) and :reset doesn't support passing settings, either, as in Scala 2.

@SethTisue
Copy link

(This seems a bit marginal to me as a feature request, since (in my experience anyway) most of the time you only have a single failed input and you can easily get to it with up-arrow.)

@som-snytt
Copy link
Author

I agree that improved edit history makes this less useful.

Noting the OP with nothing to replay means you must set :settings then up-arrow. Empty replay doesn't set settings in scala 2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants