镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Typing module A at the top of an empty .res file causes VSCode to not respond #409

Closed

Description

@fhammerschmidt

When I create a file called NodeJs.res in a rescript project, and type module A in it, VSCode completely crashes.

image

I tried to get something meaningful out of the debugger, but there is nothing.

(tested with current master/194bd3a)

Activity

  1. cristianoc commented on May 6, 2022

    @cristianoc
    Collaborator

    Would you add some details?
    Was that a pre-exiting project, and was "Start Build" pressed? Or was it being build from the outside, or not built at all.
    And was the file created from within vscode?

  2. fhammerschmidt commented on May 6, 2022

    @fhammerschmidt
    MemberAuthor

    It happened in a pre-existing project as well as in a quick rescript inited one where I just created the NodeJs.res within VSCode beside the demo.res. It even crashed with no lib folder created, before any build.

    Edit: Ah, but it only happens when rescript-vscode is activated.

  3. cristianoc commented on May 6, 2022

    @cristianoc
    Collaborator

    To rule out an issue with building the extension locally, would you try with the .vsix generated by CI?

  4. fhammerschmidt commented on May 6, 2022

    @fhammerschmidt
    MemberAuthor

    I already tried it both with the built vsix (rescript-vscode-194bd3a.vsix) as well as locally built.

  5. cknitt commented on May 6, 2022

    @cknitt
    Member

    Also happens on my machine with the VSIX built from master. Happens with "Node.res", too.

  6. cknitt commented on May 6, 2022

    @cknitt
    Member

    Actually it does not seem to be related to the filename at all.

  7. changed the title [-]A file named NodeJs.res causes VSCode to not respond[/-] [+]Typing `module A` at the top of an empty `.res` file causes VSCode to not respond[/+] on May 6, 2022
  8. fhammerschmidt commented on May 6, 2022

    @fhammerschmidt
    MemberAuthor

    You are right, it seems the file just needs to be empty and the module ... needs to be the first thing.

  9. cristianoc commented on May 6, 2022

    @cristianoc
    Collaborator

    Can see it now, thanks.

  10. cristianoc commented on May 6, 2022

    @cristianoc
    Collaborator

    Turns out the compact array notation bases on offset used by semantic tokens for speed will crash on an invalid index and bring down the whole thing without any debug info.

    Well spotted.

  11. fhammerschmidt commented on May 6, 2022

    @fhammerschmidt
    MemberAuthor

    Thank you for the fast fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions