Skip to content

fix(deps): update go-jsonnet to v0.22.0 - #271

Closed
periklis wants to merge 1 commit into
mainfrom
fix/go-jsonnet-0.22.0
Closed

fix(deps): update go-jsonnet to v0.22.0#271
periklis wants to merge 1 commit into
mainfrom
fix/go-jsonnet-0.22.0

Conversation

@periklis

Copy link
Copy Markdown

Fixes #270.

go-jsonnet v0.21.0 does not desugar the index expression of a super[e] access, leaving a nil node that makes the static analyzer panic with Unexpected node <nil>. Because DidOpen/DidChange call SnippetToAST directly, the panic takes down the server process; the client then restarts it and re-opens the same document, so any workspace containing such a file is stuck in a crash loop.

Fixed upstream in google/go-jsonnet#849, released in v0.22.0. This is the same bump Renovate proposed in #258, which was autoclosed after a transient go mod tidy TLS timeout rather than a real incompatibility.

Verification

  • go build ./... succeeds with no source changes; go test ./... passes.
  • Drove both builds over LSP stdio with initialize + didOpen of a file containing super[f.key]: the v0.21.0 build exits 2 with the panic, this build stays alive.

Note on the go directive

go mod tidy raises go from 1.24.0 to 1.24.5 and drops the now-redundant toolchain go1.24.2 line, because go-jsonnet v0.22.0 requires Go 1.24.5. CI resolves its Go version from go-version-file: go.mod, so it picks this up automatically.

go-jsonnet v0.21.0 does not desugar the index expression of a super[e]
access, leaving a nil node that makes the static analyzer panic with
"Unexpected node <nil>". Since DidOpen/DidChange call SnippetToAST
directly, this takes down the server process, and the client restarts
it and re-opens the same document, so any workspace containing such a
file is stuck in a crash loop.

Fixed upstream in google/go-jsonnet#849, released in v0.22.0.

Fixes #270

Signed-off-by: Periklis Tsirakidis <periklis.tsirakidis@grafana.com>
@periklis

periklis commented Jul 27, 2026

Copy link
Copy Markdown
Author

The failing lint check is pre-existing and unrelated to this change. Running the same golangci-lint (v2.12.2) against main at 28afd48, without this bump, reports the identical 52 issues (50 goconst, 2 staticcheck QF1012), all in files this PR does not touch. The same check is also red on unrelated dependency PRs #240 and #241.

test and every other check on this PR pass.

@periklis periklis closed this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update go-jsonnet to v0.22.0: v0.21.0 panics on super[<expr>] and crash-loops the server

1 participant