Commit 723d140
authored
Add support for disabling redirected output in the REPL driver for usage in worksheets in the Scala Plugin for IntelliJ IDEA (#16810)
- Calling `setOut/setErr` in a concurrent environment without any
synchronization (such as the Scala compile server in the Scala Plugin
for IntelliJ IDEA, which is used to execute Scala 3 worksheets) can lead
to unpredictable outcomes where the out/err streams are not restored
properly after changing.
- This change adds a new default method `redirectOutput` which can be
overriden by others to control the redirecting behavior of the REPL
driver.1 file changed
+26
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
190 | 203 | | |
191 | 204 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
203 | 218 | | |
204 | 219 | | |
205 | 220 | | |
| |||
0 commit comments