golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.85k stars 17.51k forks source link

x/tools/gopls/internal/regtest/misc: TestRenamePackageWithDifferentDirectoryPath failures #56038

Closed gopherbot closed 1 year ago

gopherbot commented 1 year ago
#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/misc" && test == "TestRenamePackageWithDifferentDirectoryPath"

Issue created automatically to collect these failures.

Example (log):

serve.go:438: debug server listening at http://localhost:49810
serve.go:438: debug server listening at http://localhost:49811
2022/10/04 16:11:32 cleaning workspace dir: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-workspace-mod3323859480: The process cannot access the file because it is being used by another process.
2022/10/04 16:11:41 cleaning workspace dir: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-workspace-mod980465144: The process cannot access the file because it is being used by another process.
#### Start Gopls Test Logs for "TestRenamePackageWithDifferentDirectoryPath/default"
[Trace - 16:12:19.589 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":null,"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"C:\\Users\\gopher\\AppData\\Local\\Temp\\1\\gopls-regtest-2615586591\\TestRenamePackageWithDifferentDirectoryPath\\default\\gopath","GOPROXY":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-regtest-2615586591/TestRenamePackageWithDifferentDirectoryPath/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-regtest-2615586591/TestRenamePackageWithDifferentDirectoryPath/default/work","name":"work"}]}

[Trace - 16:12:19.589 PM] Received response 'initialize - (1)' in 0ms.
...

[Trace - 16:12:20.019 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-regtest-2615586591/TestRenamePackageWithDifferentDirectoryPath/default/work/nested/a.go","languageId":"go","version":1,"text":"package nested\n\nconst A = 1\n\n"}}

#### End Gopls Test Logs for "TestRenamePackageWithDifferentDirectoryPath/default"
--- FAIL: TestRenamePackageWithDifferentDirectoryPath (3.13s)
    --- FAIL: TestRenamePackageWithDifferentDirectoryPath/default (0.96s)
        rename_test.go:251: rename C:\Users\gopher\AppData\Local\Temp\1\gopls-regtest-2615586591\TestRenamePackageWithDifferentDirectoryPath\default\work\lib C:\Users\gopher\AppData\Local\Temp\1\gopls-regtest-2615586591\TestRenamePackageWithDifferentDirectoryPath\default\work\nested: Access is denied.
2022/10/04 16:12:25 cleaning workspace dir: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-workspace-mod1979176953: The process cannot access the file because it is being used by another process.

watchflakes

gopherbot commented 1 year ago

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/gopls/internal/regtest/misc" && test == "TestRenamePackageWithDifferentDirectoryPath"
2022-10-04 16:03 windows-amd64-longtest tools@40dabfa8 go@6a9aaf1f x/tools/gopls/internal/regtest/misc.TestRenamePackageWithDifferentDirectoryPath (log) serve.go:438: debug server listening at http://localhost:49810 serve.go:438: debug server listening at http://localhost:49811 2022/10/04 16:11:32 cleaning workspace dir: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-workspace-mod3323859480: The process cannot access the file because it is being used by another process. 2022/10/04 16:11:41 cleaning workspace dir: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-workspace-mod980465144: The process cannot access the file because it is being used by another process. #### Start Gopls Test Logs for "TestRenamePackageWithDifferentDirectoryPath/default" [Trace - 16:12:19.589 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":null,"formats":null}},"window":{"workDoneProgress":true}},"initializationOptions":{"completionBudget":"10s","diagnosticsDelay":"10ms","env":{"GO111MODULE":"","GOMODCACHE":"","GOPACKAGESDRIVER":"off","GOPATH":"C:\\Users\\gopher\\AppData\\Local\\Temp\\1\\gopls-regtest-2615586591\\TestRenamePackageWithDifferentDirectoryPath\\default\\gopath","GOPROXY":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-regtest-2615586591/TestRenamePackageWithDifferentDirectoryPath/default/proxy","GOSUMDB":"off"},"verboseWorkDoneProgress":true},"trace":"messages","workspaceFolders":[{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-regtest-2615586591/TestRenamePackageWithDifferentDirectoryPath/default/work","name":"work"}]} [Trace - 16:12:19.589 PM] Received response 'initialize - (1)' in 0ms. ... [Trace - 16:12:20.019 PM] Sending notification 'textDocument/didOpen'. Params: {"textDocument":{"uri":"file:///C:/Users/gopher/AppData/Local/Temp/1/gopls-regtest-2615586591/TestRenamePackageWithDifferentDirectoryPath/default/work/nested/a.go","languageId":"go","version":1,"text":"package nested\n\nconst A = 1\n\n"}} #### End Gopls Test Logs for "TestRenamePackageWithDifferentDirectoryPath/default" --- FAIL: TestRenamePackageWithDifferentDirectoryPath (3.13s) --- FAIL: TestRenamePackageWithDifferentDirectoryPath/default (0.96s) rename_test.go:251: rename C:\Users\gopher\AppData\Local\Temp\1\gopls-regtest-2615586591\TestRenamePackageWithDifferentDirectoryPath\default\work\lib C:\Users\gopher\AppData\Local\Temp\1\gopls-regtest-2615586591\TestRenamePackageWithDifferentDirectoryPath\default\work\nested: Access is denied. 2022/10/04 16:12:25 cleaning workspace dir: remove C:\Users\gopher\AppData\Local\Temp\1\gopls-workspace-mod1979176953: The process cannot access the file because it is being used by another process.

watchflakes

gopherbot commented 1 year ago

Change https://go.dev/cl/440181 mentions this issue: gopls/internal/lsp/fake: retry ephemeral errors when renaming on windows

rsc commented 1 year ago

Folding into #56039.