Eugleo / magic-racket

The best coding experience for Racket in VS Code
https://marketplace.visualstudio.com/items?itemName=evzen-wybitul.magic-racket
GNU General Public License v3.0
204 stars 26 forks source link

"Load file in REPL" doesn't load file #40

Closed circumspect closed 3 years ago

circumspect commented 3 years ago

Environment

When I click the "Load file in REPL" button or run the command from the command palette, it launches a terminal and runs racket with no other arguments, and I am unable to use any names declared in the file, which suggests that the file has not been loaded.

Runi-c commented 3 years ago

Workaround for now is to simply click the button again. For some reason the first time you click it it just launches the REPL, subsequent clicks actually load the relevant file.

Eugleo commented 3 years ago

If it has been always like this, maybe it's an error on my side. I'll check the REPL-launching logic.

Btw, @Runi-c, thank you for the continuing work on the LSP! I'm following the project (as in, literally following on github) and half my emails last week were due to your PRs. Good job!

Runi-c commented 3 years ago

@Eugleo Thanks! Hope I can help out a bit here too after I'm done with the langserver.

circumspect commented 3 years ago

Having used the workaround for a while now I think I'm actually somewhat in favor of the current behavior, as it is sometimes nice to know that the REPL doesn't have anything loaded. The only issue then is that the current labeling is somewhat misleading, and there is no way for the user to know that they need to click the button again to load the file.

Eugleo commented 3 years ago

The button actually does load the REPL and the file, at least on my setup with moderately small files. Therefore, renaming the button is not a good option. The problem seems to be that sometimes the REPL doesn't finish loading when Magic Racket sends the enter! command to it. Until there is a way to know whether the REPL has loaded, I'm closing this issue.