buck2 icon indicating copy to clipboard operation
buck2 copied to clipboard

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

Open 9999years opened this issue 3 months ago • 0 comments

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

9999years avatar Oct 16 '25 23:10 9999years