flix / vscode-flix

Apache License 2.0
20 stars 23 forks source link

fix: make the REPL terminal transient #380

Closed sockmaster27 closed 6 months ago

sockmaster27 commented 6 months ago

Fixes #379

sockmaster27 commented 6 months ago

The problem did not seem to be that we were launching the terminal too early, but rather that VS Code was automatically saving the state of the terminal and relaunching it on startup, ignoring whether the compiler needed to be downloaded first.

To opt out of this I have marked the terminal as being 'transient'. This of course means that you now have to wait for the terminal to start every time you restart, but oh well.

magnus-madsen commented 6 months ago

The problem did not seem to be that we were launching the terminal too early, but rather that VS Code was automatically saving the state of the terminal and relaunching it on startup, ignoring whether the compiler needed to be downloaded first.

To opt out of this I have marked the terminal as being 'transient'. This of course means that you now have to wait for the terminal to start every time you restart, but oh well.

I think that is actually a good solution. I will try it when it get home.

magnus-madsen commented 6 months ago

Quick question: What happens if you click run 3 times?

sockmaster27 commented 6 months ago

Quick question: What happens if you click run 3 times?

Same as before. Within a single session the flixTerminal variable keeps track of the launched terminal. The searching logic was only used between restarts, but now no REPL will survive that.