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

P0: VS Code: Don't show Hot Reload buttons/commands when not supported #1604

Closed
DanTup opened this issue Apr 8, 2019 · 5 comments
Closed
Assignees
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Apr 8, 2019

Requires #1602.

@DanTup DanTup added this to the v2.26.0 milestone Apr 8, 2019
@DanTup DanTup self-assigned this Apr 8, 2019
@DanTup DanTup changed the title Don't show Hot Reload buttons/commands when not supported VS Code: Don't show Hot Reload buttons/commands when not supported Apr 8, 2019
@csells csells changed the title VS Code: Don't show Hot Reload buttons/commands when not supported P0: VS Code: Don't show Hot Reload buttons/commands when not supported Apr 8, 2019
@DanTup
Copy link
Member Author

DanTup commented Apr 9, 2019

@devoncarew @jacob314 looks like VS Code is missing something here - we're currently only picking up Service Extensions (via Isolate events of kind ServiceExtensionAdded). In order to tell if Hot Reload is available is looks like we need something different (_Service events like ServiceRegistered?).

Is there any info on this I can scan through (the VM docs only seem to mention service extensions)? In particular, in addition to the registered events, is there a way to see all those that are already registered (for ex. to handle the Attach case)? For service extensions we can get these from isolate.extensionRPCs but I don't know if there's an equiv for services?

I'm also curious about the relationship between these - should I be using both, or does one supersede the other? It likes like DevTools uses both, but I couldn't find any IntelliJ code using ServiceRegistered (but I presume it's going to need to do the same thing as me here?).

@DanTup
Copy link
Member Author

DanTup commented Apr 9, 2019

nm, this turns out to be relatively straight forward :)

Though it turns out VS Code doesn't currently refresh the debug toolbar on context changes (microsoft/vscode#69398) so for now we're going to have to hard-code this rather than react to the service extensions anyway :(

@DanTup
Copy link
Member Author

DanTup commented Apr 9, 2019

Fixed in 693612b (by hard-coding known capabilities). Opened #1608 to make this dynamic if VS Code gets a fix.

@DanTup DanTup closed this as completed Apr 9, 2019
@jacob314
Copy link

jacob314 commented Apr 9, 2019 via email

@DanTup
Copy link
Member Author

DanTup commented Apr 10, 2019

@jacob314 Thanks, what's what I figured out. The work is in 4a640e4. I hope this API is stable :-)

Unfortunately VS Code doesn't update contexts once the session has started so it's too late to show/hide the button, so for now I've had to revert it to being hard-coded (though changing this is just a simple revert of the change above if VS Code gets a fix). If Web gets Hot Reload support we'll have to push a VS Code release to change it.

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

No branches or pull requests

2 participants