Skip to content

fix: lsp crashes on wrong definitions #9

@mduthey

Description

@mduthey

Following the next example

tx crash_transaction() {
  output {
    to: "addr_...",
    datum: WrongRecord {
      ship_counter: 1,
    },
  }
}

as WrongRecord isn't defined lsp server will crash

[Info  - 12:26:16 p.m.] server initialized!

thread 'main' panicked at /Users/mduthey/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tx3-lang-0.4.1/src/analyzing.rs:454:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[Error - 12:26:16 p.m.] The Tx3 Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions