rojo-rbx / vscode-rojo

Visual Studio Code plugin for Rojo
https://marketplace.visualstudio.com/items?itemName=evaera.vscode-rojo
Mozilla Public License 2.0
36 stars 23 forks source link

Rojo session terminates in Studio when a new node is added to default.project.json #18

Closed JoelBrd closed 4 years ago

JoelBrd commented 5 years ago

When you add a new node in default.project.json (via 'Rojo: Sync from here..', I haven't checked what happens when you edit the file directly)

VSCode Terminal

Project configuration changed, reloading Rojo.
Rojo server listening on port 34872

ROBLOX Studio Output

17:49:42.880 - [Rojo-Warn] Rojo session terminated because of an error:
17:49:42.880 - [Rojo-Warn] Unknown error: HttpError: NetFail

It connects back fine by clicking 'Connect' on the Rojo ROBLOX Plugin widget, but is annoying when testing and adding new files!

LPGhatguy commented 5 years ago

Rojo 0.5.x currently doesn't respond to the project file changing itself. This is something that's fixed as part of the master branch, currently slated to be a 0.6.0 release in the future.

The VS Code plugin is what responds to the project file changing; it works by restarting the Rojo process. That forcibly kills any outstanding HTTP requests, giving you that error in the plugin!

If we fixed that error, there's another safeguard in place in the Rojo plugin that cancels the connection if a different Rojo server suddenly pops in. This fixes a couple other bugs, but makes restarting the process not quite correctly reload.

I'm going to move this over to the VS Code repository. It could be that this will remain unfixed until we do a release based on the current master codebase.

evaera commented 5 years ago

As LPG said, this is actually intentional. I think you would need to reload it manually to see your changes anyways, so it doesn't really make sense to me for this to not be the case.