Navigation Menu

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: features don't work with multiple command-line-arguments (adhoc) packages #47584

Closed
enkeyz opened this issue Aug 3, 2021 · 7 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@enkeyz
Copy link

enkeyz commented Aug 3, 2021

For asking questions, see:

Before filing an issue, please review our troubleshooting guides

Please answer these questions before submitting your issue. Thanks!

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.16.6 linux/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • zsh: command not found: gopls
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.58.2
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.26.0
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
    - https://gist.github.com/enkeyz/5a4dfbc87c40a17ccb3f5f3f0f7548a7

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.
- https://gist.github.com/enkeyz/bf091db4170845a86259bdb61143b213

Describe the bug

When you have multiple go files in a directory - and not in a module - with package main, and each file has a main function, autocomplete stops working for all files except the one you opened last. Also the function description stops working - when hovering over the function name.

I'm still learning Go, and it's really hard to experiment when you can only have one file with main function.

The only workaround to put each file with main function in a different directory, and open each directory with vscode.

Steps to reproduce the behavior:

  1. Create directory
  2. Open it in VSCode
  3. Create multiple files with *.go extension, and write main function to each one of them
  4. Switch back to the files you created previously

Screenshots or recordings

Last created file:
Screenshot from 2021-08-03 15-52-35

Switching back to previously created file:
Screenshot from 2021-08-03 15-52-59

@enkeyz enkeyz changed the title Autocomplet stop working if you have multiple files with main function in a directory Autocomplete stops working if you have multiple files with main function in a directory Aug 3, 2021
@enkeyz enkeyz changed the title Autocomplete stops working if you have multiple files with main function in a directory Autocomplete stops working if you have multiple files with main function in the same directory Aug 3, 2021
@findleyr
Copy link
Contributor

findleyr commented Aug 3, 2021

Hi! In general, you'll get an error with multiple main functions but autocomplete and other functionality should continue to work.

I think what's happening here is that you are are neither in GOPATH nor a module, and gopls is falling back to single-file mode (#34160). That should still work, but perhaps there's a bug. I haven't yet been able to reproduce the behavior you're observing in any of GOPATH, module, or single file mode.

Could you please share the version of gopls you are using? It's apparently not in your PATH, but from your gist it is at home/enkeyz/go/bin/gopls. (related advice: you might want to put $GOPATH/bin in your PATH, so that binaries installed via go install or go get will be available).

Could you also capture gopls logs from a session where you reproduce the poor behavior? Preferably a short-lived session. You can find instructions for how to do this here:
https://github.com/golang/vscode-go/blob/master/docs/troubleshooting.md#collect-gopls-information

More generally note that if there are two files with main functions in a directory, there's no easy way for gopls to Do The Right Thing. Specifically, we do want to show an error for a duplicate declaration, because there's a high likelihood that this was a programmer error. But as I said, despite the error most functionality should continue to work.

@enkeyz
Copy link
Author

enkeyz commented Aug 4, 2021

The problem was solved by adding GOPATH to the PATH.

I'm using this PPA: https://launchpad.net/~longsleep/+archive/ubuntu/golang-backports for installing Go, but looks like it didn't add GOPATH after install.

@findleyr
Copy link
Contributor

findleyr commented Aug 4, 2021

@enkeyz despite not having GOPATH in PATH, can you confirm that you did have gopls installed?

@enkeyz
Copy link
Author

enkeyz commented Aug 5, 2021

Yes, I can confirm that gopls was installed.

@hyangah
Copy link
Contributor

hyangah commented Aug 5, 2021

@findleyr I could reproduce the case (gopls v0.7.1) but it's somewhat non-deterministic at this moment. (sometimes it works, sometimes it stops working... Had to reload and retry multiple times to reproduce the problem myself)

Screen Shot 2021-08-05 at 1 44 59 PM

No go.mod and the workspace is outside GOPATH.

% tree
.
├── ch1
│   ├── echo1.go
│   └── main.go
└── test.go
gopls log
[Trace - 13:44:18.712 PM] Sending request 'initialize - (0)'.
Params: {"processId":88122,"clientInfo":{"name":"Visual Studio Code","version":"1.58.2"},"locale":"en-us","rootPath":"/Users/hakim/projects/s","rootUri":"file:///Users/hakim/projects/s","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":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":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false},"linkedEditingRange":{"dynamicRegistration":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0"}}},"initializationOptions":{},"trace":"off","workspaceFolders":[{"uri":"file:///Users/hakim/projects/s","name":"s"}]}

[Trace - 13:44:18.714 PM] Received response 'initialize - (0)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."],"completionItem":{}},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.gc_details","gopls.generate","gopls.generate_gopls_mod","gopls.go_get_package","gopls.list_known_packages","gopls.regenerate_cgo","gopls.remove_dependency","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.workspace_metadata"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{"path":"golang.org/x/tools/gopls","version":"v0.7.1","sum":"h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=","deps":[{"path":"github.com/BurntSushi/toml","version":"v0.3.1","sum":"h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ="},{"path":"github.com/google/go-cmp","version":"v0.5.5","sum":"h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU="},{"path":"github.com/sergi/go-diff","version":"v1.1.0","sum":"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0="},{"path":"golang.org/x/mod","version":"v0.4.2","sum":"h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo="},{"path":"golang.org/x/sync","version":"v0.0.0-20210220032951-036812b2e83c","sum":"h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ="},{"path":"golang.org/x/sys","version":"v0.0.0-20210510120138-977fb7262007","sum":"h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE="},{"path":"golang.org/x/tools","version":"v0.1.6-0.20210802203754-9b21a8868e16","sum":"h1:ZC/gVBZl8poJyKzWLxxlsmhayVGosF4mohR35szD5Bg="},{"path":"golang.org/x/xerrors","version":"v0.0.0-20200804184101-5ec99f83aff1","sum":"h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE="},{"path":"honnef.co/go/tools","version":"v0.2.0","sum":"h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE="},{"path":"mvdan.cc/gofumpt","version":"v0.1.1","sum":"h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA="},{"path":"mvdan.cc/xurls/v2","version":"v2.2.0","sum":"h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A="}]}"}}

[Trace - 13:44:18.766 PM] Sending notification 'initialized'.
Params: {}

[Trace - 13:44:18.766 PM] Received request 'window/workDoneProgress/create - (1)'.
Params: {"token":"5577006791947779410"}

[Trace - 13:44:18.766 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","languageId":"go","version":1,"text":"package main\n\nimport "fmt"\n\nfunc main() {\n\tfmt.Println()\n}\n"}}

[Trace - 13:44:18.768 PM] Sending response 'window/workDoneProgress/create - (1)' in 1ms.
Result:

[Trace - 13:44:18.768 PM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}

[Trace - 13:44:18.768 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///Users/hakim/projects/s","section":"gopls"}]}

[Trace - 13:44:18.773 PM] Sending response 'workspace/configuration - (2)' in 5ms.
Result: [{}]

[Trace - 13:44:18.834 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:18 go env for /Users/hakim/projects/s\n(root /Users/hakim/projects/s)\n(go version go version go1.16.5 darwin/amd64)\n(valid build configuration = false)\n(build flags: [])\nGOPATH=/Users/hakim/go\nGOPRIVATE=\nGOSUMDB=sum.golang.org\nGO111MODULE=\nGOCACHE=/Users/hakim/Library/Caches/go-build\nGOMODCACHE=/Users/hakim/go/pkg/mod\nGOMOD=/dev/null\nGOPROXY=https://proxy.golang.org,direct\nGOROOT=/usr/local/Cellar/go/1.16.5/libexec\nGOFLAGS=\nGOINSECURE=\nGONOSUMDB=\nGONOPROXY=\n\n"}

[Trace - 13:44:18.870 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:18 go/packages.Load\n\tsnapshot=0\n\tdirectory=/Users/hakim/projects/s\n\tquery=[./ builtin]\n\tpackages=2\n"}

[Trace - 13:44:18.871 PM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"end","message":"Finished loading packages."}}

[Trace - 13:44:18.873 PM] Received request 'client/registerCapability - (3)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"/*.{go,mod,sum}","kind":7},{"globPattern":"/*.*tmpl","kind":7}]}}]}

[Info - 1:44:18 PM] 2021/08/05 13:44:18 go env for /Users/hakim/projects/s
(root /Users/hakim/projects/s)
(go version go version go1.16.5 darwin/amd64)
(valid build configuration = false)
(build flags: [])
GOPATH=/Users/hakim/go
GOPRIVATE=
GOSUMDB=sum.golang.org
GO111MODULE=
GOCACHE=/Users/hakim/Library/Caches/go-build
GOMODCACHE=/Users/hakim/go/pkg/mod
GOMOD=/dev/null
GOPROXY=https://proxy.golang.org,direct
GOROOT=/usr/local/Cellar/go/1.16.5/libexec
GOFLAGS=
GOINSECURE=
GONOSUMDB=
GONOPROXY=

[Trace - 13:44:18.880 PM] Sending request 'textDocument/codeAction - (1)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":14},"end":{"line":5,"character":14}},"context":{"diagnostics":[]}}

[Trace - 13:44:18.880 PM] Sending request 'textDocument/documentLink - (2)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Info - 1:44:18 PM] 2021/08/05 13:44:18 go/packages.Load
snapshot=0
directory=/Users/hakim/projects/s
query=[./ builtin]
packages=2

[Trace - 13:44:18.891 PM] Sending response 'client/registerCapability - (3)' in 18ms.
Result:

[Trace - 13:44:18.891 PM] Received request 'client/registerCapability - (4)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}

[Trace - 13:44:18.892 PM] Sending response 'client/registerCapability - (4)' in 0ms.
Result:

[Trace - 13:44:19.186 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:19 go/packages.Load\n\tsnapshot=1\n\tpackage="command-line-arguments"\n\tfiles=[/Users/hakim/projects/s/ch1/echo1.go]\n"}

[Trace - 13:44:19.188 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:19 go/packages.Load\n\tsnapshot=1\n\tdirectory=/Users/hakim/projects/s\n\tquery=[file=/Users/hakim/projects/s/ch1/echo1.go]\n\tpackages=1\n"}

[Trace - 13:44:19.220 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:19 go/packages.Load\n\tsnapshot=1\n\tpackage="command-line-arguments"\n\tfiles=[/Users/hakim/projects/s/ch1/echo1.go]\n"}

[Trace - 13:44:19.220 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:19 go/packages.Load\n\tsnapshot=1\n\tdirectory=/Users/hakim/projects/s\n\tquery=[file=/Users/hakim/projects/s/ch1/echo1.go]\n\tpackages=1\n"}

[Info - 1:44:19 PM] 2021/08/05 13:44:19 go/packages.Load
snapshot=1
package="command-line-arguments"
files=[/Users/hakim/projects/s/ch1/echo1.go]

[Trace - 13:44:19.383 PM] Sending request 'textDocument/foldingRange - (3)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:19.384 PM] Sending request 'textDocument/codeLens - (4)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:19.389 PM] Sending notification '$/cancelRequest'.
Params: {"id":1}

[Error - Received] 13:44:19.390 PM golang/vscode-go#1 context canceled

[Trace - 13:44:19.393 PM] Sending request 'textDocument/codeAction - (5)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":14},"end":{"line":5,"character":14}},"context":{"diagnostics":[]}}

[Trace - 13:44:19.394 PM] Sending request 'textDocument/documentSymbol - (6)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Info - 1:44:19 PM] 2021/08/05 13:44:19 go/packages.Load
snapshot=1
directory=/Users/hakim/projects/s
query=[file=/Users/hakim/projects/s/ch1/echo1.go]
packages=1

[Info - 1:44:19 PM] 2021/08/05 13:44:19 go/packages.Load
snapshot=1
package="command-line-arguments"
files=[/Users/hakim/projects/s/ch1/echo1.go]

[Info - 1:44:19 PM] 2021/08/05 13:44:19 go/packages.Load
snapshot=1
directory=/Users/hakim/projects/s
query=[file=/Users/hakim/projects/s/ch1/echo1.go]
packages=1

[Error - 1:44:19 PM] Request textDocument/codeAction failed.
Message: context canceled
Code: 0
[Trace - 13:44:19.469 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:19 discovered missing identifiers: map[memRecordCycle:true pageBits:true]\n\tpackage="runtime"\n"}

[Info - 1:44:19 PM] 2021/08/05 13:44:19 discovered missing identifiers: map[memRecordCycle:true pageBits:true]
package="runtime"

[Trace - 13:44:19.560 PM] Received response 'textDocument/documentLink - (2)' in 679ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:19.560 PM] Received response 'textDocument/foldingRange - (3)' in 176ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":5,"endCharacter":14}]

[Trace - 13:44:19.560 PM] Received response 'textDocument/codeLens - (4)' in 176ms.
Result: null

[Trace - 13:44:19.561 PM] Received response 'textDocument/codeAction - (5)' in 167ms.
Result: null

[Trace - 13:44:19.561 PM] Received response 'textDocument/documentSymbol - (6)' in 166ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":6,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:19.959 PM] Sending request 'textDocument/documentSymbol - (7)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:19.960 PM] Received response 'textDocument/documentSymbol - (7)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":6,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:20.081 PM] Sending request 'textDocument/documentLink - (8)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:20.081 PM] Received response 'textDocument/documentLink - (8)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:20.132 PM] Sending request 'textDocument/codeLens - (9)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:20.132 PM] Received response 'textDocument/codeLens - (9)' in 0ms.
Result: null

[Trace - 13:44:20.792 PM] Sending request 'textDocument/documentSymbol - (10)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:20.792 PM] Received response 'textDocument/documentSymbol - (10)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":6,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:20.824 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","languageId":"go","version":1,"text":"package main\n\nimport "fmt"\n\nfunc main() {\n\tfmt.Println()\n}\n"}}

[Trace - 13:44:20.824 PM] Sending request 'textDocument/documentLink - (11)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:20.825 PM] Sending request 'textDocument/codeAction - (12)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"context":{"diagnostics":[]}}

[Trace - 13:44:20.825 PM] Sending request 'textDocument/documentSymbol - (13)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:21.005 PM] Sending request 'textDocument/foldingRange - (14)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:21.061 PM] Sending request 'textDocument/codeLens - (15)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:21.063 PM] Sending request 'textDocument/codeAction - (16)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":1}},"context":{"diagnostics":[]}}

[Trace - 13:44:21.063 PM] Sending notification '$/cancelRequest'.
Params: {"id":12}

[Trace - 13:44:21.153 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:21 go/packages.Load\n\tsnapshot=2\n\tpackage="command-line-arguments"\n\tfiles=[/Users/hakim/projects/s/ch1/main.go]\n"}

[Trace - 13:44:21.153 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:21 go/packages.Load\n\tsnapshot=2\n\tdirectory=/Users/hakim/projects/s\n\tquery=[file=/Users/hakim/projects/s/ch1/main.go]\n\tpackages=1\n"}

[Info - 1:44:21 PM] 2021/08/05 13:44:21 go/packages.Load
snapshot=2
package="command-line-arguments"
files=[/Users/hakim/projects/s/ch1/main.go]

[Info - 1:44:21 PM] 2021/08/05 13:44:21 go/packages.Load
snapshot=2
directory=/Users/hakim/projects/s
query=[file=/Users/hakim/projects/s/ch1/main.go]
packages=1

[Trace - 13:44:21.157 PM] Received response 'textDocument/documentLink - (11)' in 332ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:21.157 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:21 go/packages.Load\n\tsnapshot=2\n\tdirectory=/Users/hakim/projects/s\n\tquery=[file=/Users/hakim/projects/s/ch1/main.go]\n\tpackages=1\n"}

[Trace - 13:44:21.157 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:21 go/packages.Load\n\tsnapshot=2\n\tpackage="command-line-arguments"\n\tfiles=[/Users/hakim/projects/s/ch1/main.go]\n"}

[Error - Received] 13:44:21.157 PM golang/vscode-go#12 JSON RPC cancelled

[Trace - 13:44:21.157 PM] Received response 'textDocument/documentSymbol - (13)' in 332ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":6,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:21.157 PM] Received response 'textDocument/foldingRange - (14)' in 152ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":5,"endCharacter":14}]

[Trace - 13:44:21.157 PM] Received response 'textDocument/codeLens - (15)' in 96ms.
Result: null

[Trace - 13:44:21.158 PM] Received response 'textDocument/codeAction - (16)' in 95ms.
Result: null

[Info - 1:44:21 PM] 2021/08/05 13:44:21 go/packages.Load
snapshot=2
directory=/Users/hakim/projects/s
query=[file=/Users/hakim/projects/s/ch1/main.go]
packages=1

[Info - 1:44:21 PM] 2021/08/05 13:44:21 go/packages.Load
snapshot=2
package="command-line-arguments"
files=[/Users/hakim/projects/s/ch1/main.go]

[Trace - 13:44:22.005 PM] Sending request 'textDocument/codeAction - (17)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":5,"character":14},"end":{"line":5,"character":14}},"context":{"diagnostics":[]}}

[Trace - 13:44:22.006 PM] Received response 'textDocument/codeAction - (17)' in 0ms.
Result: null

[Trace - 13:44:22.978 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":2},"contentChanges":[{"range":{"start":{"line":5,"character":14},"end":{"line":5,"character":14}},"rangeLength":0,"text":"\n\t"}]}

[Trace - 13:44:22.981 PM] Received request 'client/registerCapability - (5)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-1","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"/*.{go,mod,sum}","kind":7},{"globPattern":"/*.*tmpl","kind":7},{"globPattern":"{/Users/hakim/projects/s/ch1}","kind":7}]}}]}

[Trace - 13:44:22.982 PM] Sending response 'client/registerCapability - (5)' in 0ms.
Result:

[Trace - 13:44:22.983 PM] Received request 'client/unregisterCapability - (6)'.
Params: {"unregisterations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles"}]}

[Trace - 13:44:22.983 PM] Sending response 'client/unregisterCapability - (6)' in 0ms.
Result:

[Trace - 13:44:23.166 PM] Sending request 'textDocument/foldingRange - (18)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:23.166 PM] Received response 'textDocument/foldingRange - (18)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":5,"endCharacter":14}]

[Trace - 13:44:23.219 PM] Sending request 'textDocument/codeLens - (19)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:23.219 PM] Received response 'textDocument/codeLens - (19)' in 0ms.
Result: null

[Trace - 13:44:23.543 PM] Sending request 'textDocument/documentSymbol - (20)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:23.544 PM] Received response 'textDocument/documentSymbol - (20)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":7,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:23.710 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":3},"contentChanges":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":1}},"rangeLength":0,"text":"f"}]}

[Trace - 13:44:23.716 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":3,"diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UndeclaredName"},"source":"compiler","message":"undeclared name: f","tags":[1]}]}

[Trace - 13:44:23.719 PM] Sending request 'textDocument/completion - (21)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"position":{"line":6,"character":2},"context":{"triggerKind":1}}

[Trace - 13:44:23.768 PM] Received response 'textDocument/completion - (21)' in 48ms.
Result: {"isIncomplete":true,"items":[{"label":"fmt","labelDetails":{},"kind":9,"detail":""fmt"","preselect":true,"sortText":"00000","filterText":"fmt","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"fmt"}},{"label":"for","labelDetails":{},"kind":14,"sortText":"00001","filterText":"for","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"for"}},{"label":"false","labelDetails":{},"kind":21,"sortText":"00002","filterText":"false","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"false"}},{"label":"float32","labelDetails":{},"kind":7,"sortText":"00003","filterText":"float32","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"float32"}},{"label":"float64","labelDetails":{},"kind":7,"sortText":"00004","filterText":"float64","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"float64"}},{"label":"fcgi","labelDetails":{},"kind":9,"detail":""net/http/fcgi"","sortText":"00005","filterText":"fcgi","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"fcgi"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"\t"net/http/fcgi"\n)\n"}]},{"label":"filepath","labelDetails":{},"kind":9,"detail":""path/filepath"","sortText":"00006","filterText":"filepath","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"filepath"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"\t"path/filepath"\n)\n"}]},{"label":"flate","labelDetails":{},"kind":9,"detail":""compress/flate"","sortText":"00007","filterText":"flate","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"flate"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"compress/flate"\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":")\n"}]},{"label":"fs","labelDetails":{},"kind":9,"detail":""io/fs"","sortText":"00008","filterText":"fs","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"fs"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"\t"io/fs"\n)\n"}]},{"label":"fmtsort","labelDetails":{},"kind":9,"detail":""internal/fmtsort"","sortText":"00009","filterText":"fmtsort","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"fmtsort"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"\t"internal/fmtsort"\n)\n"}]},{"label":"fmt.Errorf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) error","documentation":"Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n","sortText":"00010","filterText":"fmt.Errorf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"fmt.Errorf(${1:})"}},{"label":"fmt.Formatter","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n","sortText":"00011","filterText":"fmt.Formatter","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"fmt.Formatter"}},{"label":"fmt.Fprint","labelDetails":{},"kind":3,"detail":"func(w io.Writer, a ...interface{}) (n int, err error)","documentation":"Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00012","filterText":"fmt.Fprint","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"fmt.Fprint(${1:})"}}]}

[Trace - 13:44:23.902 PM] Sending request 'textDocument/foldingRange - (22)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:23.902 PM] Received response 'textDocument/foldingRange - (22)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":2}]

[Trace - 13:44:23.952 PM] Sending request 'textDocument/codeLens - (23)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:23.952 PM] Received response 'textDocument/codeLens - (23)' in 0ms.
Result: null

[Trace - 13:44:23.971 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":4},"contentChanges":[{"range":{"start":{"line":6,"character":2},"end":{"line":6,"character":2}},"rangeLength":0,"text":"m"}]}

[Trace - 13:44:23.971 PM] Sending request 'textDocument/completion - (24)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"position":{"line":6,"character":3},"context":{"triggerKind":3}}

[Trace - 13:44:23.972 PM] Sending request 'textDocument/documentLink - (25)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:23.974 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":4,"diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UndeclaredName"},"source":"compiler","message":"undeclared name: fm","tags":[1]}]}

[Trace - 13:44:24.074 PM] Received response 'textDocument/completion - (24)' in 102ms.
Result: {"isIncomplete":true,"items":[{"label":"fmt","labelDetails":{},"kind":9,"detail":""fmt"","preselect":true,"sortText":"00000","filterText":"fmt","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"newText":"fmt"}},{"label":"fmtsort","labelDetails":{},"kind":9,"detail":""internal/fmtsort"","sortText":"00001","filterText":"fmtsort","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"newText":"fmtsort"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"\t"internal/fmtsort"\n)\n"}]},{"label":"fmt.Errorf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) error","documentation":"Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n","sortText":"00002","filterText":"fmt.Errorf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"newText":"fmt.Errorf(${1:})"}},{"label":"fmt.Formatter","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n","sortText":"00003","filterText":"fmt.Formatter","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"newText":"fmt.Formatter"}},{"label":"fmt.Fprint","labelDetails":{},"kind":3,"detail":"func(w io.Writer, a ...interface{}) (n int, err error)","documentation":"Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00004","filterText":"fmt.Fprint","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"newText":"fmt.Fprint(${1:})"}}]}

[Trace - 13:44:24.074 PM] Received response 'textDocument/documentLink - (25)' in 101ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:24.228 PM] Sending request 'textDocument/foldingRange - (26)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:24.230 PM] Sending request 'textDocument/codeLens - (27)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:24.231 PM] Received response 'textDocument/foldingRange - (26)' in 3ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":3}]

[Trace - 13:44:24.234 PM] Received response 'textDocument/codeLens - (27)' in 4ms.
Result: null

[Trace - 13:44:24.234 PM] Sending request 'textDocument/codeAction - (28)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"context":{"diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"message":"undeclared name: fm","code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source%3Dgopls#UndeclaredName"},"severity":1,"tags":[1],"source":"compiler"}]}}

[Trace - 13:44:24.236 PM] Received response 'textDocument/codeAction - (28)' in 1ms.
Result: [{"title":"undeclared name: fm","kind":"quickfix","diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source%3Dgopls#UndeclaredName"},"source":"compiler","message":"undeclared name: fm","tags":[1]}],"edit":{},"command":{"title":"undeclared name: fm","command":"gopls.apply_fix","arguments":[{"Fix":"undeclared_name","URI":"file:///Users/hakim/projects/s/ch1/main.go","Range":{"start":{"line":6,"character":1},"end":{"line":6,"character":3}}}]}}]

[Trace - 13:44:24.311 PM] Sending request 'textDocument/documentSymbol - (29)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:24.312 PM] Received response 'textDocument/documentSymbol - (29)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":7,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:24.435 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":5},"contentChanges":[{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":3}},"rangeLength":0,"text":"t"}]}

[Trace - 13:44:24.436 PM] Sending request 'textDocument/completion - (30)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"position":{"line":6,"character":4},"context":{"triggerKind":3}}

[Trace - 13:44:24.438 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":5,"diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"severity":1,"code":"InvalidPkgUse","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#InvalidPkgUse"},"source":"compiler","message":"use of package fmt not in selector"}]}

[Trace - 13:44:24.537 PM] Received response 'textDocument/completion - (30)' in 101ms.
Result: {"isIncomplete":true,"items":[{"label":"fmt","labelDetails":{},"kind":9,"detail":""fmt"","preselect":true,"sortText":"00000","filterText":"fmt","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"newText":"fmt"}},{"label":"fmtsort","labelDetails":{},"kind":9,"detail":""internal/fmtsort"","sortText":"00001","filterText":"fmtsort","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"newText":"fmtsort"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"\t"internal/fmtsort"\n)\n"}]},{"label":"fmtsort","labelDetails":{},"kind":9,"detail":""github.com/rogpeppe/go-internal/fmtsort"","sortText":"00002","filterText":"fmtsort","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"newText":"fmtsort"},"additionalTextEdits":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"newText":"(\n\t"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"\n\t"github.com/rogpeppe/go-internal/fmtsort"\n)\n"}]},{"label":"fmt.Errorf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) error","documentation":"Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n","sortText":"00003","filterText":"fmt.Errorf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"newText":"fmt.Errorf(${1:})"}},{"label":"fmt.Formatter","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n","sortText":"00004","filterText":"fmt.Formatter","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"newText":"fmt.Formatter"}},{"label":"fmt.Fprint","labelDetails":{},"kind":3,"detail":"func(w io.Writer, a ...interface{}) (n int, err error)","documentation":"Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00005","filterText":"fmt.Fprint","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"newText":"fmt.Fprint(${1:})"}}]}

[Trace - 13:44:24.627 PM] Sending request 'textDocument/foldingRange - (31)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:24.628 PM] Received response 'textDocument/foldingRange - (31)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":4}]

[Trace - 13:44:24.675 PM] Sending request 'textDocument/codeLens - (32)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:24.676 PM] Received response 'textDocument/codeLens - (32)' in 1ms.
Result: null

[Trace - 13:44:24.702 PM] Sending request 'textDocument/codeAction - (33)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":6,"character":4},"end":{"line":6,"character":4}},"context":{"diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":4}},"message":"use of package fmt not in selector","code":"InvalidPkgUse","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source%3Dgopls#InvalidPkgUse"},"severity":1,"source":"compiler"}]}}

[Trace - 13:44:24.703 PM] Received response 'textDocument/codeAction - (33)' in 1ms.
Result: null

[Trace - 13:44:24.775 PM] Sending request 'textDocument/documentSymbol - (34)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:24.776 PM] Received response 'textDocument/documentSymbol - (34)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":7,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:25.012 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":6},"contentChanges":[{"range":{"start":{"line":6,"character":4},"end":{"line":6,"character":4}},"rangeLength":0,"text":"."}]}

[Trace - 13:44:25.012 PM] Sending request 'textDocument/completion - (35)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"position":{"line":6,"character":5},"context":{"triggerKind":2,"triggerCharacter":"."}}

[Trace - 13:44:25.016 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":6,"diagnostics":[{"range":{"start":{"line":6,"character":6},"end":{"line":6,"character":6}},"severity":1,"source":"syntax","message":"expected selector or type assertion, found '}'"}]}

[Trace - 13:44:25.017 PM] Received response 'textDocument/completion - (35)' in 4ms.
Result: {"isIncomplete":true,"items":[{"label":"Errorf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) error","documentation":"Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n","preselect":true,"sortText":"00000","filterText":"Errorf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Errorf(${1:})"}},{"label":"Formatter","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n","sortText":"00001","filterText":"Formatter","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Formatter"}},{"label":"Fprint","labelDetails":{},"kind":3,"detail":"func(w io.Writer, a ...interface{}) (n int, err error)","documentation":"Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00002","filterText":"Fprint","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Fprint(${1:})"}},{"label":"Fprintf","labelDetails":{},"kind":3,"detail":"func(w io.Writer, format string, a ...interface{}) (n int, err error)","documentation":"Fprintf formats according to a format specifier and writes to w.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00003","filterText":"Fprintf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Fprintf(${1:})"}},{"label":"Fprintln","labelDetails":{},"kind":3,"detail":"func(w io.Writer, a ...interface{}) (n int, err error)","documentation":"Fprintln formats using the default formats for its operands and writes to w.\nSpaces are always added between operands and a newline is appended.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00004","filterText":"Fprintln","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Fprintln(${1:})"}},{"label":"Fscan","labelDetails":{},"kind":3,"detail":"func(r io.Reader, a ...interface{}) (n int, err error)","documentation":"Fscan scans text read from r, storing successive space-separated\nvalues into successive arguments. Newlines count as space. It\nreturns the number of items successfully scanned. If that is less\nthan the number of arguments, err will report why.\n","sortText":"00005","filterText":"Fscan","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Fscan(${1:})"}},{"label":"Fscanf","labelDetails":{},"kind":3,"detail":"func(r io.Reader, format string, a ...interface{}) (n int, err error)","documentation":"Fscanf scans text read from r, storing successive space-separated\nvalues into successive arguments as determined by the format. It\nreturns the number of items successfully parsed.\nNewlines in the input must match newlines in the format.\n","sortText":"00006","filterText":"Fscanf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Fscanf(${1:})"}},{"label":"Fscanln","labelDetails":{},"kind":3,"detail":"func(r io.Reader, a ...interface{}) (n int, err error)","documentation":"Fscanln is similar to Fscan, but stops scanning at a newline and\nafter the final item there must be a newline or EOF.\n","sortText":"00007","filterText":"Fscanln","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Fscanln(${1:})"}},{"label":"GoStringer","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"GoStringer is implemented by any value that has a GoString method,\nwhich defines the Go syntax for that value.\nThe GoString method is used to print values passed as an operand\nto a %#v format.\n","sortText":"00008","filterText":"GoStringer","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"GoStringer"}},{"label":"Print","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) (n int, err error)","documentation":"Print formats using the default formats for its operands and writes to standard output.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00009","filterText":"Print","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Print(${1:})"}},{"label":"Printf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) (n int, err error)","documentation":"Printf formats according to a format specifier and writes to standard output.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00010","filterText":"Printf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Printf(${1:})"}},{"label":"Println","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) (n int, err error)","documentation":"Println formats using the default formats for its operands and writes to standard output.\nSpaces are always added between operands and a newline is appended.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00011","filterText":"Println","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Println(${1:})"}},{"label":"Scan","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) (n int, err error)","documentation":"Scan scans text read from standard input, storing successive\nspace-separated values into successive arguments. Newlines count\nas space. It returns the number of items successfully scanned.\nIf that is less than the number of arguments, err will report why.\n","sortText":"00012","filterText":"Scan","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Scan(${1:})"}},{"label":"ScanState","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"ScanState represents the scanner state passed to custom scanners.\nScanners may do rune-at-a-time scanning or ask the ScanState\nto discover the next space-delimited token.\n","sortText":"00013","filterText":"ScanState","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"ScanState"}},{"label":"Scanf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) (n int, err error)","documentation":"Scanf scans text read from standard input, storing successive\nspace-separated values into successive arguments as determined by\nthe format. It returns the number of items successfully scanned.\nIf that is less than the number of arguments, err will report why.\nNewlines in the input must match newlines in the format.\nThe one exception: the verb %c always scans the next rune in the\ninput, even if it is a space (or tab etc.) or newline.\n","sortText":"00014","filterText":"Scanf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Scanf(${1:})"}},{"label":"Scanln","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) (n int, err error)","documentation":"Scanln is similar to Scan, but stops scanning at a newline and\nafter the final item there must be a newline or EOF.\n","sortText":"00015","filterText":"Scanln","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Scanln(${1:})"}},{"label":"Scanner","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"Scanner is implemented by any value that has a Scan method, which scans\nthe input for the representation of a value and stores the result in the\nreceiver, which must be a pointer to be useful. The Scan method is called\nfor any argument to Scan, Scanf, or Scanln that implements it.\n","sortText":"00016","filterText":"Scanner","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Scanner"}},{"label":"Sprint","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) string","documentation":"Sprint formats using the default formats for its operands and returns the resulting string.\nSpaces are added between operands when neither is a string.\n","sortText":"00017","filterText":"Sprint","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Sprint(${1:})"}},{"label":"Sprintf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) string","documentation":"Sprintf formats according to a format specifier and returns the resulting string.\n","sortText":"00018","filterText":"Sprintf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Sprintf(${1:})"}},{"label":"Sprintln","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) string","documentation":"Sprintln formats using the default formats for its operands and returns the resulting string.\nSpaces are always added between operands and a newline is appended.\n","sortText":"00019","filterText":"Sprintln","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Sprintln(${1:})"}},{"label":"Sscan","labelDetails":{},"kind":3,"detail":"func(str string, a ...interface{}) (n int, err error)","documentation":"Sscan scans the argument string, storing successive space-separated\nvalues into successive arguments. Newlines count as space. It\nreturns the number of items successfully scanned. If that is less\nthan the number of arguments, err will report why.\n","sortText":"00020","filterText":"Sscan","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Sscan(${1:})"}},{"label":"Sscanf","labelDetails":{},"kind":3,"detail":"func(str string, format string, a ...interface{}) (n int, err error)","documentation":"Sscanf scans the argument string, storing successive space-separated\nvalues into successive arguments as determined by the format. It\nreturns the number of items successfully parsed.\nNewlines in the input must match newlines in the format.\n","sortText":"00021","filterText":"Sscanf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Sscanf(${1:})"}},{"label":"Sscanln","labelDetails":{},"kind":3,"detail":"func(str string, a ...interface{}) (n int, err error)","documentation":"Sscanln is similar to Sscan, but stops scanning at a newline and\nafter the final item there must be a newline or EOF.\n","sortText":"00022","filterText":"Sscanln","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Sscanln(${1:})"}},{"label":"State","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"State represents the printer state passed to custom formatters.\nIt provides access to the io.Writer interface plus information about\nthe flags and options for the operand's format specifier.\n","sortText":"00023","filterText":"State","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"State"}},{"label":"Stringer","labelDetails":{},"kind":8,"detail":"interface{...}","documentation":"Stringer is implemented by any value that has a String method,\nwhich defines the ``native'' format for that value.\nThe String method is used to print values passed as an operand\nto any format that accepts a string or to an unformatted printer\nsuch as Print.\n","sortText":"00024","filterText":"Stringer","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"newText":"Stringer"}}]}

[Trace - 13:44:25.204 PM] Sending request 'textDocument/foldingRange - (36)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:25.204 PM] Received response 'textDocument/foldingRange - (36)' in 0ms.
Result: []

[Trace - 13:44:25.254 PM] Sending request 'textDocument/codeLens - (37)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:25.254 PM] Received response 'textDocument/codeLens - (37)' in 0ms.
Result: null

[Trace - 13:44:25.272 PM] Sending request 'textDocument/codeAction - (38)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"context":{"diagnostics":[]}}

[Trace - 13:44:25.272 PM] Received response 'textDocument/codeAction - (38)' in 0ms.
Result: null

[Trace - 13:44:25.353 PM] Sending request 'textDocument/documentSymbol - (39)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:25.353 PM] Received response 'textDocument/documentSymbol - (39)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":7,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:25.427 PM] Sending request 'textDocument/documentLink - (40)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:25.428 PM] Received response 'textDocument/documentLink - (40)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:28.870 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":7},"contentChanges":[{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":5}},"rangeLength":0,"text":"P"}]}

[Trace - 13:44:28.871 PM] Sending request 'textDocument/completion - (41)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"position":{"line":6,"character":6},"context":{"triggerKind":3}}

[Trace - 13:44:28.874 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":7,"diagnostics":[{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":6}},"severity":1,"code":"UndeclaredImportedName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UndeclaredImportedName"},"source":"compiler","message":"P not declared by package fmt"}]}

[Trace - 13:44:28.875 PM] Received response 'textDocument/completion - (41)' in 4ms.
Result: {"isIncomplete":true,"items":[{"label":"Print","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) (n int, err error)","documentation":"Print formats using the default formats for its operands and writes to standard output.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n","preselect":true,"sortText":"00000","filterText":"Print","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":6}},"newText":"Print(${1:})"}},{"label":"Printf","labelDetails":{},"kind":3,"detail":"func(format string, a ...interface{}) (n int, err error)","documentation":"Printf formats according to a format specifier and writes to standard output.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00001","filterText":"Printf","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":6}},"newText":"Printf(${1:})"}},{"label":"Println","labelDetails":{},"kind":3,"detail":"func(a ...interface{}) (n int, err error)","documentation":"Println formats using the default formats for its operands and writes to standard output.\nSpaces are always added between operands and a newline is appended.\nIt returns the number of bytes written and any write error encountered.\n","sortText":"00002","filterText":"Println","insertTextFormat":2,"textEdit":{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":6}},"newText":"Println(${1:})"}}]}

[Trace - 13:44:29.064 PM] Sending request 'textDocument/foldingRange - (42)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:29.065 PM] Received response 'textDocument/foldingRange - (42)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":6}]

[Trace - 13:44:29.114 PM] Sending request 'textDocument/codeLens - (43)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:29.114 PM] Received response 'textDocument/codeLens - (43)' in 0ms.
Result: null

[Trace - 13:44:29.132 PM] Sending request 'textDocument/codeAction - (44)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":6,"character":6},"end":{"line":6,"character":6}},"context":{"diagnostics":[{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":6}},"message":"P not declared by package fmt","code":"UndeclaredImportedName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source%3Dgopls#UndeclaredImportedName"},"severity":1,"source":"compiler"}]}}

[Trace - 13:44:29.133 PM] Received response 'textDocument/codeAction - (44)' in 0ms.
Result: null

[Trace - 13:44:29.214 PM] Sending request 'textDocument/documentSymbol - (45)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:29.214 PM] Received response 'textDocument/documentSymbol - (45)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":7,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:29.863 PM] Sending request 'textDocument/documentLink - (46)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:29.863 PM] Received response 'textDocument/documentLink - (46)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:30.461 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":8},"contentChanges":[{"range":{"start":{"line":6,"character":5},"end":{"line":6,"character":6}},"rangeLength":1,"text":"Print()"}]}

[Trace - 13:44:30.462 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/s/ch1/main.go","version":8,"diagnostics":[]}

[Trace - 13:44:30.466 PM] Sending request 'textDocument/signatureHelp - (47)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"position":{"line":6,"character":11},"context":{"isRetrigger":false,"triggerKind":1}}

[Trace - 13:44:30.467 PM] Received response 'textDocument/signatureHelp - (47)' in 0ms.
Result: {"signatures":[{"label":"Print(a ...interface{}) (n int, err error)","documentation":"Print formats using the default formats for its operands and writes to standard output.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n","parameters":[{"label":"a ...interface{}"}]}],"activeSignature":0,"activeParameter":0}

[Trace - 13:44:30.651 PM] Sending request 'textDocument/foldingRange - (48)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:30.652 PM] Received response 'textDocument/foldingRange - (48)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":12}]

[Trace - 13:44:30.704 PM] Sending request 'textDocument/codeLens - (49)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:30.705 PM] Received response 'textDocument/codeLens - (49)' in 0ms.
Result: null

[Trace - 13:44:30.722 PM] Sending request 'textDocument/codeAction - (50)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"},"range":{"start":{"line":6,"character":11},"end":{"line":6,"character":11}},"context":{"diagnostics":[]}}

[Trace - 13:44:30.722 PM] Received response 'textDocument/codeAction - (50)' in 0ms.
Result: null

[Trace - 13:44:30.803 PM] Sending request 'textDocument/documentSymbol - (51)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:30.804 PM] Received response 'textDocument/documentSymbol - (51)' in 0ms.
Result: [{"name":"main","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":7,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}}]

[Trace - 13:44:31.457 PM] Sending request 'textDocument/documentLink - (52)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:31.458 PM] Received response 'textDocument/documentLink - (52)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:35.710 PM] Sending request 'textDocument/documentSymbol - (53)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/main.go"}}

[Trace - 13:44:35.711 PM] Sending request 'textDocument/documentLink - (54)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:35.711 PM] Sending request 'textDocument/codeAction - (55)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"context":{"diagnostics":[]}}

[Trace - 13:44:35.712 PM] Sending notification '$/cancelRequest'.
Params: {"id":53}

[Trace - 13:44:35.712 PM] Sending request 'textDocument/documentSymbol - (56)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Error - Received] 13:44:35.715 PM golang/vscode-go#53 JSON RPC cancelled

[Trace - 13:44:35.715 PM] Received response 'textDocument/documentLink - (54)' in 4ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:35.716 PM] Received response 'textDocument/codeAction - (55)' in 5ms.
Result: null

[Trace - 13:44:35.716 PM] Received response 'textDocument/documentSymbol - (56)' in 3ms.
Result: []

[Trace - 13:44:35.716 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:35 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:35 PM] 2021/08/05 13:44:35 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:35.878 PM] Sending request 'textDocument/foldingRange - (57)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:35.878 PM] Received response 'textDocument/foldingRange - (57)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":5,"endCharacter":14}]

[Trace - 13:44:35.934 PM] Sending request 'textDocument/codeAction - (58)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":14},"end":{"line":5,"character":14}},"context":{"diagnostics":[]}}

[Trace - 13:44:35.935 PM] Received response 'textDocument/codeAction - (58)' in 0ms.
Result: null

[Trace - 13:44:35.960 PM] Sending request 'textDocument/codeLens - (59)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:35.960 PM] Received response 'textDocument/codeLens - (59)' in 0ms.
Result: null

[Trace - 13:44:37.393 PM] Sending request 'textDocument/codeAction - (60)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":4,"character":13},"end":{"line":4,"character":13}},"context":{"diagnostics":[]}}

[Trace - 13:44:37.393 PM] Received response 'textDocument/codeAction - (60)' in 0ms.
Result: null

[Trace - 13:44:38.700 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":2},"contentChanges":[{"range":{"start":{"line":4,"character":13},"end":{"line":4,"character":13}},"rangeLength":0,"text":"\n\t"}]}

[Trace - 13:44:38.890 PM] Sending request 'textDocument/foldingRange - (61)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:38.891 PM] Received response 'textDocument/foldingRange - (61)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:38.938 PM] Sending request 'textDocument/codeLens - (62)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:38.939 PM] Received response 'textDocument/codeLens - (62)' in 0ms.
Result: null

[Trace - 13:44:39.043 PM] Sending request 'textDocument/documentSymbol - (63)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:39.044 PM] Received response 'textDocument/documentSymbol - (63)' in 1ms.
Result: []

[Trace - 13:44:39.044 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:39 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:39 PM] 2021/08/05 13:44:39 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:39.111 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":3},"contentChanges":[{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":1}},"rangeLength":0,"text":"f"}]}

[Trace - 13:44:39.129 PM] Sending request 'textDocument/completion - (64)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"position":{"line":5,"character":2},"context":{"triggerKind":1}}

[Trace - 13:44:39.130 PM] Received response 'textDocument/completion - (64)' in 0ms.
Result: {"isIncomplete":true,"items":[]}

[Trace - 13:44:39.130 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:39 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tposition={5 2}\n"}

[Error - 1:44:39 PM] 2021/08/05 13:44:39 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
position={5 2}

[Trace - 13:44:39.311 PM] Sending request 'textDocument/foldingRange - (65)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:39.311 PM] Received response 'textDocument/foldingRange - (65)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:39.359 PM] Sending request 'textDocument/codeLens - (66)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:39.360 PM] Received response 'textDocument/codeLens - (66)' in 0ms.
Result: null

[Trace - 13:44:39.360 PM] Sending request 'textDocument/codeAction - (67)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":2},"end":{"line":5,"character":2}},"context":{"diagnostics":[]}}

[Trace - 13:44:39.361 PM] Received response 'textDocument/codeAction - (67)' in 0ms.
Result: null

[Trace - 13:44:39.460 PM] Sending request 'textDocument/documentSymbol - (68)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:39.461 PM] Received response 'textDocument/documentSymbol - (68)' in 0ms.
Result: []

[Trace - 13:44:39.461 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:39 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:39 PM] 2021/08/05 13:44:39 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:39.688 PM] Sending request 'textDocument/documentLink - (69)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:39.688 PM] Received response 'textDocument/documentLink - (69)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:40.409 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":4},"contentChanges":[{"range":{"start":{"line":5,"character":2},"end":{"line":5,"character":2}},"rangeLength":0,"text":"m"}]}

[Trace - 13:44:40.599 PM] Sending request 'textDocument/foldingRange - (70)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:40.599 PM] Received response 'textDocument/foldingRange - (70)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:40.650 PM] Sending request 'textDocument/codeLens - (71)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:40.650 PM] Sending request 'textDocument/codeAction - (72)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":3},"end":{"line":5,"character":3}},"context":{"diagnostics":[]}}

[Trace - 13:44:40.650 PM] Received response 'textDocument/codeLens - (71)' in 0ms.
Result: null

[Trace - 13:44:40.651 PM] Received response 'textDocument/codeAction - (72)' in 0ms.
Result: null

[Trace - 13:44:40.749 PM] Sending request 'textDocument/documentSymbol - (73)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:40.750 PM] Received response 'textDocument/documentSymbol - (73)' in 0ms.
Result: []

[Trace - 13:44:40.750 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:40 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:40 PM] 2021/08/05 13:44:40 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:40.876 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":5},"contentChanges":[{"range":{"start":{"line":5,"character":3},"end":{"line":5,"character":3}},"rangeLength":0,"text":"t"}]}

[Trace - 13:44:41.067 PM] Sending request 'textDocument/foldingRange - (74)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:41.068 PM] Received response 'textDocument/foldingRange - (74)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:41.119 PM] Sending request 'textDocument/codeLens - (75)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:41.119 PM] Sending request 'textDocument/codeAction - (76)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":4}},"context":{"diagnostics":[]}}

[Trace - 13:44:41.119 PM] Received response 'textDocument/codeLens - (75)' in 0ms.
Result: null

[Trace - 13:44:41.120 PM] Received response 'textDocument/codeAction - (76)' in 0ms.
Result: null

[Trace - 13:44:41.218 PM] Sending request 'textDocument/documentSymbol - (77)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:41.218 PM] Received response 'textDocument/documentSymbol - (77)' in 0ms.
Result: []

[Trace - 13:44:41.218 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:41 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:41 PM] 2021/08/05 13:44:41 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:41.394 PM] Sending request 'textDocument/documentLink - (78)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:41.394 PM] Received response 'textDocument/documentLink - (78)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:42.325 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":6},"contentChanges":[{"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":4}},"rangeLength":0,"text":"."}]}

[Trace - 13:44:42.326 PM] Sending request 'textDocument/completion - (79)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"position":{"line":5,"character":5},"context":{"triggerKind":2,"triggerCharacter":"."}}

[Trace - 13:44:42.328 PM] Received response 'textDocument/completion - (79)' in 2ms.
Result: {"isIncomplete":true,"items":[]}

[Trace - 13:44:42.329 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:42 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tposition={5 5}\n"}

[Error - 1:44:42 PM] 2021/08/05 13:44:42 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
position={5 5}

[Trace - 13:44:42.517 PM] Sending request 'textDocument/foldingRange - (80)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:42.517 PM] Received response 'textDocument/foldingRange - (80)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:42.570 PM] Sending request 'textDocument/codeLens - (81)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:42.570 PM] Sending request 'textDocument/codeAction - (82)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":5},"end":{"line":5,"character":5}},"context":{"diagnostics":[]}}

[Trace - 13:44:42.570 PM] Received response 'textDocument/codeLens - (81)' in 0ms.
Result: null

[Trace - 13:44:42.571 PM] Received response 'textDocument/codeAction - (82)' in 0ms.
Result: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"documentChanges":[{"textDocument":{"version":6,"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"edits":[{"range":{"start":{"line":1,"character":0},"end":{"line":3,"character":0}},"newText":""}]}]}}]

[Trace - 13:44:42.667 PM] Sending request 'textDocument/documentSymbol - (83)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:42.667 PM] Received response 'textDocument/documentSymbol - (83)' in 0ms.
Result: []

[Trace - 13:44:42.667 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:42 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:42 PM] 2021/08/05 13:44:42 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:43.318 PM] Sending request 'textDocument/documentLink - (84)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:43.319 PM] Received response 'textDocument/documentLink - (84)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:47.826 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":7},"contentChanges":[{"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":5}},"rangeLength":1,"text":""}]}

[Trace - 13:44:48.021 PM] Sending request 'textDocument/foldingRange - (85)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:48.021 PM] Received response 'textDocument/foldingRange - (85)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:48.071 PM] Sending request 'textDocument/codeLens - (86)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:48.072 PM] Sending request 'textDocument/codeAction - (87)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":4}},"context":{"diagnostics":[]}}

[Trace - 13:44:48.072 PM] Received response 'textDocument/codeLens - (86)' in 0ms.
Result: null

[Trace - 13:44:48.072 PM] Received response 'textDocument/codeAction - (87)' in 0ms.
Result: null

[Trace - 13:44:48.172 PM] Sending request 'textDocument/documentSymbol - (88)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:48.173 PM] Received response 'textDocument/documentSymbol - (88)' in 0ms.
Result: []

[Trace - 13:44:48.173 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:48 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:48 PM] 2021/08/05 13:44:48 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:48.231 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":8},"contentChanges":[{"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":4}},"rangeLength":0,"text":"."}]}

[Trace - 13:44:48.231 PM] Sending request 'textDocument/completion - (89)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"position":{"line":5,"character":5},"context":{"triggerKind":2,"triggerCharacter":"."}}

[Trace - 13:44:48.237 PM] Received response 'textDocument/completion - (89)' in 5ms.
Result: {"isIncomplete":true,"items":[]}

[Trace - 13:44:48.237 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:48 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tposition={5 5}\n"}

[Error - 1:44:48 PM] 2021/08/05 13:44:48 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
position={5 5}

[Trace - 13:44:48.427 PM] Sending request 'textDocument/foldingRange - (90)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:48.427 PM] Received response 'textDocument/foldingRange - (90)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:48.479 PM] Sending request 'textDocument/codeLens - (91)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:48.479 PM] Sending request 'textDocument/codeAction - (92)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":5},"end":{"line":5,"character":5}},"context":{"diagnostics":[]}}

[Trace - 13:44:48.479 PM] Received response 'textDocument/codeLens - (91)' in 0ms.
Result: null

[Trace - 13:44:48.479 PM] Received response 'textDocument/codeAction - (92)' in 0ms.
Result: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"documentChanges":[{"textDocument":{"version":8,"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"edits":[{"range":{"start":{"line":1,"character":0},"end":{"line":3,"character":0}},"newText":""}]}]}}]

[Trace - 13:44:48.582 PM] Sending request 'textDocument/documentSymbol - (93)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:48.582 PM] Received response 'textDocument/documentSymbol - (93)' in 0ms.
Result: []

[Trace - 13:44:48.582 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:48 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:48 PM] 2021/08/05 13:44:48 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:48.823 PM] Sending request 'textDocument/documentLink - (94)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:48.823 PM] Received response 'textDocument/documentLink - (94)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:48.897 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:48 background imports cache refresh starting\n"}

[Info - 1:44:48 PM] 2021/08/05 13:44:48 background imports cache refresh starting

[Trace - 13:44:49.359 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/05 13:44:49 background refresh finished after 462.791304ms\n"}

[Info - 1:44:49 PM] 2021/08/05 13:44:49 background refresh finished after 462.791304ms

[Trace - 13:44:50.872 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":9},"contentChanges":[{"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":5}},"rangeLength":1,"text":""}]}

[Trace - 13:44:51.067 PM] Sending request 'textDocument/foldingRange - (95)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.067 PM] Received response 'textDocument/foldingRange - (95)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:51.123 PM] Sending request 'textDocument/codeLens - (96)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.123 PM] Sending request 'textDocument/codeAction - (97)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":4}},"context":{"diagnostics":[]}}

[Trace - 13:44:51.123 PM] Received response 'textDocument/codeLens - (96)' in 0ms.
Result: null

[Trace - 13:44:51.124 PM] Received response 'textDocument/codeAction - (97)' in 0ms.
Result: null

[Trace - 13:44:51.222 PM] Sending request 'textDocument/documentSymbol - (98)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.222 PM] Received response 'textDocument/documentSymbol - (98)' in 0ms.
Result: []

[Trace - 13:44:51.222 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:51 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:51 PM] 2021/08/05 13:44:51 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:51.268 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":10},"contentChanges":[{"range":{"start":{"line":5,"character":4},"end":{"line":5,"character":4}},"rangeLength":0,"text":"."}]}

[Trace - 13:44:51.268 PM] Sending request 'textDocument/completion - (99)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"position":{"line":5,"character":5},"context":{"triggerKind":2,"triggerCharacter":"."}}

[Trace - 13:44:51.270 PM] Received response 'textDocument/completion - (99)' in 2ms.
Result: {"isIncomplete":true,"items":[]}

[Trace - 13:44:51.271 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:51 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tposition={5 5}\n"}

[Error - 1:44:51 PM] 2021/08/05 13:44:51 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
position={5 5}

[Trace - 13:44:51.462 PM] Sending request 'textDocument/foldingRange - (100)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.462 PM] Received response 'textDocument/foldingRange - (100)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:51.510 PM] Sending request 'textDocument/codeLens - (101)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.510 PM] Sending request 'textDocument/codeAction - (102)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":5},"end":{"line":5,"character":5}},"context":{"diagnostics":[]}}

[Trace - 13:44:51.510 PM] Received response 'textDocument/codeLens - (101)' in 0ms.
Result: null

[Trace - 13:44:51.511 PM] Received response 'textDocument/codeAction - (102)' in 0ms.
Result: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"documentChanges":[{"textDocument":{"version":10,"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"edits":[{"range":{"start":{"line":1,"character":0},"end":{"line":3,"character":0}},"newText":""}]}]}}]

[Trace - 13:44:51.613 PM] Sending request 'textDocument/documentSymbol - (103)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.614 PM] Received response 'textDocument/documentSymbol - (103)' in 0ms.
Result: []

[Trace - 13:44:51.614 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:51 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:51 PM] 2021/08/05 13:44:51 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

[Trace - 13:44:51.675 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go","version":11},"contentChanges":[{"range":{"start":{"line":5,"character":5},"end":{"line":5,"character":5}},"rangeLength":0,"text":"P"}]}

[Trace - 13:44:51.679 PM] Sending request 'textDocument/completion - (104)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"position":{"line":5,"character":6},"context":{"triggerKind":1}}

[Trace - 13:44:51.679 PM] Received response 'textDocument/completion - (104)' in 0ms.
Result: {"isIncomplete":true,"items":[]}

[Trace - 13:44:51.679 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:51 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tposition={5 6}\n"}

[Error - 1:44:51 PM] 2021/08/05 13:44:51 no completions found: getting file for Completion: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
position={5 6}

[Trace - 13:44:51.867 PM] Sending request 'textDocument/documentLink - (105)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.867 PM] Sending request 'textDocument/foldingRange - (106)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.867 PM] Received response 'textDocument/documentLink - (105)' in 0ms.
Result: [{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":11}},"target":"https://pkg.go.dev/fmt?utm_source=gopls"}]

[Trace - 13:44:51.868 PM] Received response 'textDocument/foldingRange - (106)' in 0ms.
Result: [{"startLine":4,"startCharacter":13,"endLine":6,"endCharacter":14}]

[Trace - 13:44:51.923 PM] Sending request 'textDocument/codeLens - (107)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:51.923 PM] Sending request 'textDocument/codeAction - (108)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"},"range":{"start":{"line":5,"character":6},"end":{"line":5,"character":6}},"context":{"diagnostics":[]}}

[Trace - 13:44:51.924 PM] Received response 'textDocument/codeLens - (107)' in 0ms.
Result: null

[Trace - 13:44:51.924 PM] Received response 'textDocument/codeAction - (108)' in 1ms.
Result: null

[Trace - 13:44:52.018 PM] Sending request 'textDocument/documentSymbol - (109)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/s/ch1/echo1.go"}}

[Trace - 13:44:52.018 PM] Received response 'textDocument/documentSymbol - (109)' in 0ms.
Result: []

[Trace - 13:44:52.019 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/05 13:44:52 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments\n\tURI=file:///Users/hakim/projects/s/ch1/echo1.go\n"}

[Error - 1:44:52 PM] 2021/08/05 13:44:52 DocumentSymbols failed: getting file for DocumentSymbols: no parsed file for file:///Users/hakim/projects/s/ch1/echo1.go in command-line-arguments
URI=file:///Users/hakim/projects/s/ch1/echo1.go

@enkeyz Since you are using 1.16, I strongly recommend to create go.mod in the workspace root folder, by running 'go mod init ; go mod tidy`. So gopls can be fully functioning.

@stamblerre stamblerre self-assigned this Aug 6, 2021
@stamblerre stamblerre transferred this issue from golang/vscode-go Aug 6, 2021
@stamblerre stamblerre changed the title Autocomplete stops working if you have multiple files with main function in the same directory x/tools/gopls: features don't work with multiple command-line-arguments (adhoc) packages Aug 6, 2021
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Aug 6, 2021
@gopherbot gopherbot added this to the Unreleased milestone Aug 6, 2021
@stamblerre
Copy link
Contributor

Transferring to gopls, as this is an issue with multiple adhoc packages. The current work-around recommendation is definitely to create a module, but we should probably consider other ways to handle this.

I was able to reproduce the issue, and I got error messages such as:

[Error - 6:18:06 PM] 2021/08/06 18:18:06 no completions found: getting file for Completion: no parsed file for file:///Users/rstambler/modules/testytest/ch1/main.go in command-line-arguments (package completions: invalid position for package completion: cursor after expression): no parsed file for file:///Users/rstambler/modules/testytest/ch1/main.go in command-line-arguments

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v1.0.0 Aug 6, 2021
@stamblerre stamblerre removed their assignment Aug 6, 2021
@stamblerre stamblerre added this to To Do in gopls on-deck Aug 11, 2021
@stamblerre stamblerre moved this from To Do to P2 in gopls on-deck Aug 12, 2021
@gopherbot
Copy link

Change https://golang.org/cl/341611 mentions this issue: internal/lsp: allow for multiple ad-hoc packages in the workspace

@stamblerre stamblerre self-assigned this Aug 12, 2021
gopls on-deck automation moved this from P2 to Done Aug 12, 2021
@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.7.2 Aug 12, 2021
@golang golang locked and limited conversation to collaborators Jun 23, 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. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
No open projects
Development

No branches or pull requests

5 participants