Skip to content
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

Read-only REPL bug #1070

Open
OlliKiljunen opened this issue Oct 19, 2023 · 2 comments
Open

Read-only REPL bug #1070

OlliKiljunen opened this issue Oct 19, 2023 · 2 comments

Comments

@OlliKiljunen
Copy link
Member

Not necessarily related to the plugin but let's investigate.
REPL sometimes goes to a read-only mode. That is, if a user tries to write to the REPL, it says that the view is read-only.

@OlliKiljunen
Copy link
Member Author

The error message in question is "This view is read-only".

It may appear both with our plugin or without it.

Apparently, it may happen when you write (or paste) multi-line input, then press enter, then unfocus the REPL and then bring focus there again.

It seems to be related to other issues that IntelliJ's Scala (especially Scala 3??) REPL has with multiline inputs.

The case where I can reproduce the bug is when, after entering multiline input, the REPL, for some reason, still waits for another Enter (Ctrl+Enter with the O1 settings). This happens sometimes (both with or without our plugin) and unfocusing the REPL in that state may lead to this error.

Too bad, I haven't yet found a 100 % sure way to reproduce this but this minimal procedure with the Scala REPL (with normal settings and WITHOUT our plugin) makes the bug happen about 50% of times:

  1. Open the REPL.
  2. Press Shift+Enter.
  3. Press Enter.
  4. Focus the editor.
  5. Focus the REPL again and try to type something.

(If the bug does not occur, try to repeat the steps 2-5 in the same REPL.)

@oseppala
Copy link
Member

oseppala commented Oct 2, 2024

I saw the problem today in a normal terminal window in IJ. So it is not specific to the plugin.

The program in question only had a readLine-command running. The student was able to write text but was not allowed to press enter.

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

No branches or pull requests

2 participants