Skip to content

Declaration of an object with an empty key breaks language server. #299

Closed

Description

@alarbada

The following code:

let test = {
  "": "dasfadsf",
}

Apparently breaks the language server if I save the file multiple times, as this vscode message says:
The ReScript Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

Is this expected? I have autosave activated with 200ms of margin, so the errors appear automatically in my screen. I believe this syntax shouldn't break the plugin.

rescript vscode version: 1.1.3
rescript version: 9.1.4

Activity

  1. alarbada commented on Aug 30, 2021

    @alarbada
    Author
  2. amiralies commented on Aug 31, 2021

    @amiralies
    Contributor

    This is becuase server is failing to parse the error message.

    about empty object keys,
    they are not supported at the moment so we should either make parser to disallow them or make the compiler support them, I think since the object access syntax is updated (x[""]) we can make the compiler to allow them.

    about the crash,
    I think this is happening because the compiler log parser is throwing we should make that more resilient

  3. zth commented on May 5, 2022

    @zth
    Member

    I cannot reproduce this as of now, so considering this solved. Feel free to reopen if not.

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