Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls/internal/regtest/misc: TestExtractFunction failures #57371

Closed
gopherbot opened this issue Dec 17, 2022 · 2 comments
Closed

x/tools/gopls/internal/regtest/misc: TestExtractFunction failures #57371

gopherbot opened this issue Dec 17, 2022 · 2 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/misc" && test == "TestExtractFunction"

Issue created automatically to collect these failures.

Example (log):

serve.go:434: debug server listening at http://localhost:40327
serve.go:434: debug server listening at http://localhost:34107
2022/12/12 23:18:34 template: :9:109: executing "body" at <.Session.ID>: can't evaluate field Session in type *cache.View
server.go:3217: http: superfluous response.WriteHeader call from golang.org/x/tools/gopls/internal/lsp/debug.render.func1 (serve.go:666)
#### Start Gopls Test Logs for "TestExtractFunction/experimental"
[Trace - 23:18:53.458 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"clientInfo":{"name":"fakeclient","version":"v1.0.0"},"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"commitCharactersSupport":false,"documentationFormat":null,"deprecatedSupport":false,"preselectSupport":false,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":false,"resolveSupport":{"properties":null},"insertTextModeSupport":{"valueSet":null},"labelDetailsSupport":false}},"hover":{},"documentSymbol":{},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"rename":{},"foldingRange":{},"publishDiagnostics":{},"semanticTokens":{"requests":{"range":false,"full":true},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/gopath","GOPROXY":"file:///tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/work","name":"work"}]}


[Trace - 23:18:53.458 PM] Received response 'initialize - (1)' in 0ms.
...
Params: {"command":"gopls.apply_fix","arguments":[{"Fix":"extract_function","URI":"file:///tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/work/main.go","Range":{"start":{"line":3,"character":1},"end":{"line":4,"character":1}}}]}


[Error - Received] 23:18:53.546 PM #3 start: pos 15 is not in range for file [105:156)


#### End Gopls Test Logs for "TestExtractFunction/experimental"
--- FAIL: TestExtractFunction (0.31s)
    --- FAIL: TestExtractFunction/experimental (0.11s)
        extract_test.go:52: start: pos 15 is not in range for file [105:156)

watchflakes

@gopherbot gopherbot added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Dec 17, 2022
@gopherbot gopherbot added this to the Unreleased milestone Dec 17, 2022
@gopherbot
Copy link
Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/misc" && test == "TestExtractFunction"
2022-12-12 16:16 linux-arm64-longtest tools@18f76ecd go@b16e94d1 x/tools/gopls/internal/regtest/misc.TestExtractFunction (log)
serve.go:434: debug server listening at http://localhost:40327
serve.go:434: debug server listening at http://localhost:34107
2022/12/12 23:18:34 template: :9:109: executing "body" at <.Session.ID>: can't evaluate field Session in type *cache.View
server.go:3217: http: superfluous response.WriteHeader call from golang.org/x/tools/gopls/internal/lsp/debug.render.func1 (serve.go:666)
#### Start Gopls Test Logs for "TestExtractFunction/experimental"
[Trace - 23:18:53.458 PM] Sending request 'initialize - (1)'.
Params: {"processId":0,"clientInfo":{"name":"fakeclient","version":"v1.0.0"},"rootUri":"","capabilities":{"workspace":{"workspaceEdit":{"resourceOperations":["rename"]},"didChangeConfiguration":{},"didChangeWatchedFiles":{"dynamicRegistration":true},"configuration":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":true,"commitCharactersSupport":false,"documentationFormat":null,"deprecatedSupport":false,"preselectSupport":false,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":false,"resolveSupport":{"properties":null},"insertTextModeSupport":{"valueSet":null},"labelDetailsSupport":false}},"hover":{},"documentSymbol":{},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":null}}},"rename":{},"foldingRange":{},"publishDiagnostics":{},"semanticTokens":{"requests":{"range":false,"full":true},"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"/tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/gopath","GOPROXY":"file:///tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/work","name":"work"}]}


[Trace - 23:18:53.458 PM] Received response 'initialize - (1)' in 0ms.
...
Params: {"command":"gopls.apply_fix","arguments":[{"Fix":"extract_function","URI":"file:///tmp/workdir/tmp/gopls-regtest-2828949610/TestExtractFunction/experimental/work/main.go","Range":{"start":{"line":3,"character":1},"end":{"line":4,"character":1}}}]}


[Error - Received] 23:18:53.546 PM #3 start: pos 15 is not in range for file [105:156)


#### End Gopls Test Logs for "TestExtractFunction/experimental"
--- FAIL: TestExtractFunction (0.31s)
    --- FAIL: TestExtractFunction/experimental (0.11s)
        extract_test.go:52: start: pos 15 is not in range for file [105:156)

watchflakes

@findleyr
Copy link
Contributor

Fixed by https://go.dev/cl/456977

@golang golang locked and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: Done
Development

No branches or pull requests

2 participants