Skip to content

Commit e316125

Browse files
committed
internal/golangorgx/tools/tokeninternal: remove
https://go.dev/cl/675736 changed the implementation and size of go/token.FileSet, so the `const delta` array assertion in tokeninternal started failing on go@master. `cue lsp` doesn't actually need to load any Go code, nor cache its ASTs, so we can safely remove this package in any case. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Ic2d5f5e5d65630c9b55642653502eccc84184d04 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1216311 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Roger Peppe <[email protected]> Reviewed-by: Matthew Sackman <[email protected]> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1216718
1 parent 0f896f6 commit e316125

File tree

2 files changed

+3
-153
lines changed

2 files changed

+3
-153
lines changed

internal/golangorgx/gopls/cache/parse_cache.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"cuelang.org/go/internal/golangorgx/gopls/file"
2121
"cuelang.org/go/internal/golangorgx/gopls/protocol"
2222
"cuelang.org/go/internal/golangorgx/tools/memoize"
23-
"cuelang.org/go/internal/golangorgx/tools/tokeninternal"
2423
"golang.org/x/sync/errgroup"
2524
)
2625

@@ -368,7 +367,9 @@ func (c *parseCache) parseFiles(ctx context.Context, fset *token.FileSet, mode p
368367
}
369368
tokenFiles = append(tokenFiles, pgf.Tok)
370369
}
371-
tokeninternal.AddExistingFiles(fset, tokenFiles)
370+
// Disabled because the tokeninternal hacks broke with Go 1.25,
371+
// and `cue lsp` doesn't need to load Go code anyway.
372+
// tokeninternal.AddExistingFiles(fset, tokenFiles)
372373

373374
const debugIssue59080 = true
374375
if debugIssue59080 {

internal/golangorgx/tools/tokeninternal/tokeninternal.go

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)