Skip to content

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

Closed

Description

@DanTup

Requires #1602.

Activity

  1. added this to the v2.26.0 milestone on Apr 8, 2019
  2. self-assigned this
    on Apr 8, 2019
  3. 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[/+] on Apr 8, 2019
  4. 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[/+] on Apr 8, 2019
  5. DanTup commented on Apr 9, 2019

    @DanTup
    MemberAuthor

    @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?).

  6. DanTup commented on Apr 9, 2019

    @DanTup
    MemberAuthor

    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 :(

  7. DanTup commented on Apr 9, 2019

    @DanTup
    MemberAuthor

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

  8. jacob314 commented on Apr 9, 2019

    @jacob314
  9. DanTup commented on Apr 10, 2019

    @DanTup
    MemberAuthor

    @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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions