Skip to content

buck2 lsp shows parse error diagnostics at line 1 column 1 rather than the error location #1126

@9999years

Description

@9999years

For this parse error (from CLI output):

Command failed:
From load at prelude/prelude.bzl:8

Caused by:
    0: From load at prelude/native.bzl:30
    1: From load at prelude/rules.bzl:15
    2: From load at prelude/rules_impl.bzl:33
    3: From load at prelude/haskell/haskell_ghci.bzl:20
    4: Error parsing: `prelude//haskell/compile.bzl`
    5: error: Parse error: unexpected symbol ',' here, expected one of "]"
           --> prelude/haskell/compile.bzl:1274:53
            |
       1274 |         package_deps: dict[str, dict[str, list[str]],  # `dict[modname, dict[pkgname, list[modname]]`
            |                                                     ^
            |

buck2 lsp shows a single diagnostic at line 1 column 1 with the text Error parsing: `prelude//haskell/compile.bzl`. The actual parse error message (unexpected symbol ',' here, expected one of "]") is hidden, as is the error location (line 1274 column 53).

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