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/go/packages: fails on ad-hoc package with bad import #33374

Closed
muirdm opened this issue Jul 30, 2019 · 3 comments
Closed

x/tools/go/packages: fails on ad-hoc package with bad import #33374

muirdm opened this issue Jul 30, 2019 · 3 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

@muirdm
Copy link

muirdm commented Jul 30, 2019

On master (ed3277d) when I first load a file with a non-existent import, I get a "no packages found error". For example, create a new package with this file:

package main
import (
	_ "banana"
)
func main() {
}

And then open in your editor. I see the below errors, which persist until I edit the buffer.

81.288793ms for GOROOT= GOPATH=<my GOPATH> GO111MODULE= PWD=/Users/muir/scratch/foo/ go "list" "-e" "-json" "-compiled=true" "-test=true" "-export=false" "-deps=true" "-find=false" "--" "/Users/muir/scratch/foo/foo.go", stderr: <<build command-line-arguments: cannot load banana: cannot find module providing package banana
>>

unable to check package: go/packages.Load: no packages found for /Users/muir/scratch/foo/foo.go
	file = file:///Users/muir/scratch/foo/foo.go

LSP :: GetAST: unable to check package for file:///Users/muir/scratch/foo/foo.go: go/packages.Load: no packages found for /Users/muir/scratch/foo/foo.go
@gopherbot gopherbot added this to the Unreleased milestone Jul 30, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jul 30, 2019
@stamblerre stamblerre changed the title x/tools/gopls: can't load packages with bad imports x/tools/go/packages: fails on ad-hoc package with bad import Aug 6, 2019
@stamblerre
Copy link
Contributor

This appears to be a go/packages issue.

In this example, go/packages will not provide any output.

$ mkdir ~/tmp
$ cat > tmp.go <<EOF
package main
import _ "banana"
func main() {}

EOF
$ gopackages -json -deps -mode=imports file=~/tmp/tmp.go

In this example, go/packages will produce output for an ad-hoc package.

$ mkdir ~/tmp
$ cat > tmp.go <<EOF
package main
//import _ "banana"
func main() {}

EOF
$ gopackages -json -deps -mode=imports file=~/tmp/tmp.go
{
	"ID": "command-line-arguments",
	"Name": "main",
	"PkgPath": "command-line-arguments",
	"GoFiles": [
		"$HOME/tmp/tmp.go"
	],
	"CompiledGoFiles": [
		"$HOME/tmp/tmp.go"
	]

/cc @matloob

@gopherbot
Copy link

Change https://golang.org/cl/192260 mentions this issue: go/packages: add a test case for golang/go#33374

gopherbot pushed a commit to golang/tools that referenced this issue Sep 10, 2019
Change-Id: Iea94f3fd4ec2faa67a26176250e20f98d693f91d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/192260
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
myitcv added a commit to govim/govim that referenced this issue Sep 11, 2019
* internal/lsp: process configuration options more thoroughly 16c5e0f7
* go/packages: add a test case for golang/go#33374 c9a5ac55
* internal/lsp: treat completion documentation errors as actual errors ec76318e
* internal/imports: fix scanning GOROOT in module mode 7f5965fd
* internal/lsp: add ID to the package cache key 3e6e7c42
* internal/imports: add all interfaces in mkstdlib d0542c01
* internal/lsp: start handling watched file deletes 5e3480f0
* internal/imports: fix mkstdlib, run for go1.13 df93a1b9
* internal/lsp: fix completion for nested *ast.BadStmt 3cd124fa
* go/analysis: copyedit doc.go c1ad8a4b
* internal/lsp: only build a view when we have its configuration 3d22a3cf
* internal/lsp: derive ASTs from type information 238129aa
myitcv added a commit to govim/govim that referenced this issue Sep 11, 2019
* internal/lsp: process configuration options more thoroughly 16c5e0f7
* go/packages: add a test case for golang/go#33374 c9a5ac55
* internal/lsp: treat completion documentation errors as actual errors ec76318e
* internal/imports: fix scanning GOROOT in module mode 7f5965fd
* internal/lsp: add ID to the package cache key 3e6e7c42
* internal/imports: add all interfaces in mkstdlib d0542c01
* internal/lsp: start handling watched file deletes 5e3480f0
* internal/imports: fix mkstdlib, run for go1.13 df93a1b9
* internal/lsp: fix completion for nested *ast.BadStmt 3cd124fa
* go/analysis: copyedit doc.go c1ad8a4b
* internal/lsp: only build a view when we have its configuration 3d22a3cf
* internal/lsp: derive ASTs from type information 238129aa
myitcv added a commit to govim/govim that referenced this issue Sep 11, 2019
* internal/lsp: process configuration options more thoroughly 16c5e0f7
* go/packages: add a test case for golang/go#33374 c9a5ac55
* internal/lsp: treat completion documentation errors as actual errors ec76318e
* internal/imports: fix scanning GOROOT in module mode 7f5965fd
* internal/lsp: add ID to the package cache key 3e6e7c42
* internal/imports: add all interfaces in mkstdlib d0542c01
* internal/lsp: start handling watched file deletes 5e3480f0
* internal/imports: fix mkstdlib, run for go1.13 df93a1b9
* internal/lsp: fix completion for nested *ast.BadStmt 3cd124fa
* go/analysis: copyedit doc.go c1ad8a4b
* internal/lsp: only build a view when we have its configuration 3d22a3cf
* internal/lsp: derive ASTs from type information 238129aa
myitcv added a commit to govim/govim that referenced this issue Sep 12, 2019
* internal/lsp: update go.mod for next version 6bfd74cf
* internal/lsp: use the view options, not the session options c7d52e45
* gopls/doc: update config settings in documentation 63a3583f
* go/packages: allow types loading without NeedDeps 7dd31af5
* internal/lsp: update gopls mod file b87a5f9d
* internal/lsp: merge session and view options into one b13fa046
* internal/lsp: prepare for tagged version 4f2ddba3
* internal/lsp: process configuration options more thoroughly 16c5e0f7
* go/packages: add a test case for golang/go#33374 c9a5ac55
* internal/lsp: treat completion documentation errors as actual errors ec76318e
* internal/imports: fix scanning GOROOT in module mode 7f5965fd
* internal/lsp: add ID to the package cache key 3e6e7c42
* internal/imports: add all interfaces in mkstdlib d0542c01
* internal/lsp: start handling watched file deletes 5e3480f0
* internal/imports: fix mkstdlib, run for go1.13 df93a1b9
* internal/lsp: fix completion for nested *ast.BadStmt 3cd124fa
* go/analysis: copyedit doc.go c1ad8a4b
* internal/lsp: only build a view when we have its configuration 3d22a3cf
* internal/lsp: derive ASTs from type information 238129aa
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 12, 2019
myitcv added a commit to govim/govim that referenced this issue Sep 13, 2019
* go/packages: suppress go list -e error when directory outside modules 3720d1ec
* internal/lsp: turn fuzzy matching and deep completions back on 87d9f09c
* internal/testenv: handle GOPACKAGESDRIVER=off in NeedsGopackage b0a6c2aa
* go/packages: fall back to loading from export data if sources are missing 22c3443c
* Fixed documentation for gopls installation 44811c01
* internal/lsp: update go.mod for next version 6bfd74cf
* internal/lsp: use the view options, not the session options c7d52e45
* gopls/doc: update config settings in documentation 63a3583f
* go/packages: allow types loading without NeedDeps 7dd31af5
* internal/lsp: update gopls mod file b87a5f9d
* internal/lsp: merge session and view options into one b13fa046
* internal/lsp: prepare for tagged version 4f2ddba3
* internal/lsp: process configuration options more thoroughly 16c5e0f7
* go/packages: add a test case for golang/go#33374 c9a5ac55
* internal/lsp: treat completion documentation errors as actual errors ec76318e
* internal/imports: fix scanning GOROOT in module mode 7f5965fd
* internal/lsp: add ID to the package cache key 3e6e7c42
* internal/imports: add all interfaces in mkstdlib d0542c01
* internal/lsp: start handling watched file deletes 5e3480f0
* internal/imports: fix mkstdlib, run for go1.13 df93a1b9
* internal/lsp: fix completion for nested *ast.BadStmt 3cd124fa
* go/analysis: copyedit doc.go c1ad8a4b
* internal/lsp: only build a view when we have its configuration 3d22a3cf
* internal/lsp: derive ASTs from type information 238129aa
myitcv added a commit to govim/govim that referenced this issue Sep 13, 2019
* go/packages: suppress go list -e error when directory outside modules 3720d1ec
* internal/lsp: turn fuzzy matching and deep completions back on 87d9f09c
* internal/testenv: handle GOPACKAGESDRIVER=off in NeedsGopackage b0a6c2aa
* go/packages: fall back to loading from export data if sources are missing 22c3443c
* Fixed documentation for gopls installation 44811c01
* internal/lsp: update go.mod for next version 6bfd74cf
* internal/lsp: use the view options, not the session options c7d52e45
* gopls/doc: update config settings in documentation 63a3583f
* go/packages: allow types loading without NeedDeps 7dd31af5
* internal/lsp: update gopls mod file b87a5f9d
* internal/lsp: merge session and view options into one b13fa046
* internal/lsp: prepare for tagged version 4f2ddba3
* internal/lsp: process configuration options more thoroughly 16c5e0f7
* go/packages: add a test case for golang/go#33374 c9a5ac55
* internal/lsp: treat completion documentation errors as actual errors ec76318e
* internal/imports: fix scanning GOROOT in module mode 7f5965fd
* internal/lsp: add ID to the package cache key 3e6e7c42
* internal/imports: add all interfaces in mkstdlib d0542c01
* internal/lsp: start handling watched file deletes 5e3480f0
* internal/imports: fix mkstdlib, run for go1.13 df93a1b9
* internal/lsp: fix completion for nested *ast.BadStmt 3cd124fa
* go/analysis: copyedit doc.go c1ad8a4b
* internal/lsp: only build a view when we have its configuration 3d22a3cf
* internal/lsp: derive ASTs from type information 238129aa
myitcv added a commit to govim/govim that referenced this issue Sep 13, 2019
* go/packages: suppress go list -e error when directory outside modules 3720d1ec
* internal/lsp: turn fuzzy matching and deep completions back on 87d9f09c
* internal/testenv: handle GOPACKAGESDRIVER=off in NeedsGopackage b0a6c2aa
* go/packages: fall back to loading from export data if sources are missing 22c3443c
* Fixed documentation for gopls installation 44811c01
* internal/lsp: update go.mod for next version 6bfd74cf
* internal/lsp: use the view options, not the session options c7d52e45
* gopls/doc: update config settings in documentation 63a3583f
* go/packages: allow types loading without NeedDeps 7dd31af5
* internal/lsp: update gopls mod file b87a5f9d
* internal/lsp: merge session and view options into one b13fa046
* internal/lsp: prepare for tagged version 4f2ddba3
* internal/lsp: process configuration options more thoroughly 16c5e0f7
* go/packages: add a test case for golang/go#33374 c9a5ac55
* internal/lsp: treat completion documentation errors as actual errors ec76318e
* internal/imports: fix scanning GOROOT in module mode 7f5965fd
* internal/lsp: add ID to the package cache key 3e6e7c42
* internal/imports: add all interfaces in mkstdlib d0542c01
* internal/lsp: start handling watched file deletes 5e3480f0
* internal/imports: fix mkstdlib, run for go1.13 df93a1b9
* internal/lsp: fix completion for nested *ast.BadStmt 3cd124fa
* go/analysis: copyedit doc.go c1ad8a4b
* internal/lsp: only build a view when we have its configuration 3d22a3cf
* internal/lsp: derive ASTs from type information 238129aa
@gopherbot
Copy link

Change https://golang.org/cl/195319 mentions this issue: go/packages: enable TestAdHocPackagesBadImport

clintjedwards pushed a commit to clintjedwards/tools that referenced this issue Sep 19, 2019
Change-Id: Iea94f3fd4ec2faa67a26176250e20f98d693f91d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/192260
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
aminjam pushed a commit to cloudfoundry/diego-release that referenced this issue Jul 22, 2020
[finishes #173843870](https://www.pivotaltracker.com/story/show/173843870)

Submodule src/golang.org/x/crypto 8b5121be2...69ecbb4d6:
  > cryptobyte: fix panic due to malformed ASN.1 inputs on 32-bit archs
  < [release-branch.go1.13] cryptobyte: fix panic due to malformed ASN.1 inputs on 32-bit archs
  > openpgp/armor: allow armored PGP signature without a CRC
  > ssh/terminal: stop using ENABLE_LINE_INPUT
  > poly1305: drop broken arm assembly
  > sha3: fix SHA-3 on s390x when using KIMD instruction
  > internal/wycheproof: skip failing test on 32-bit arm
  > nacl/box: support anonymous seal/open
  > internal/wycheproof: add Wycheproof tests for verifying signatures
  > acme: expect standard ASN.1 signatures from ECDSA Client.Key
  > ssh: reject unencrypted keys from ParsePrivateKeyWithPassphrase
  > ssh: add sk-ecdsa-sha2-nistp256 and sk-ed25519
  > ssh/agent: fix TestServerResponseTooLarge on Plan 9
  > ssh/agent: fix example
  > ssh/agent: clear the environment when starting ssh-agent in client_test
  > ssh/test: fix test goroutine error handling
  > openpgp/elgamal: prevent bad key from causing panic in Decrypt
  > chacha20: implement XChaCha20
  > chacha20: expose internal/chacha20 package
  > internal/chacha20: cache first round across XORKeyStream invocations
  > internal/chacha20: refactor for readability and consistency
  > poly1305: rewrite the Go implementation with 64-bit limbs
  > pkcs12: fix dropped error
  > ssh: fix dropped error
  > acme/internal/acmeprobe: fix dropped error variable
  > curve25519: implement new X25519 API and deprecate ScalarMult
  > curve25519: update package structure per golang.org/wiki/TargetSpecific
  > internal/chacha20: fix minor naming issue
  > sha3: align (*state).storage
  > acme/autocert: always pass AuthzURLs from AuthorizeOrder to deactivatePendingAuthz
  > go.mod: set go version
  > acme/autocert: give tokensMu a better name
  > acme/autocert: support ACME RFC 8555
  > acme: update Directory URL to Let's Encrypt v2
  > acme: prevent discovery network roundtrips in tests
  > internal/chacha20: improve chacha20 performance on ppc64le
  > openpgp/packet: support crypto.Decrypter in EncryptedKey.Decrypt
  > acme/internal: add a prober program
  > acme: update existing methods for RFC 8555
  > acme: implement new order-based issuance methods
  > acme: support RFC 8555 account management
  > Revert "ssh/terminal: account for win32 api changes"
  > acme: add KID variant to jwsEncodeJSON
  > acme: fetch fresh nonces from newNonce resource
  > acme: add support for RFC8555 compliant discovery
  > ssh/terminal: account for win32 api changes
  > acme/autocert: remove tls-sni-xx challenge support
  > ssh: drop dh-group1-sha1 from default key exchanges
  > sha3: add a space before +build in build tag comments
  > ssh/test: delete TestInvalidTerminalMode
  > acme/autocert: remove tempfile after dircache write failed
  > ssh: skip testHandshakeErrorHandlingN on js/wasm
  > acme: send User-Agent and add Client.UserAgent
  > ed25519: turn into a wrapper for crypto/ed25519 beginning with Go 1.13
  > ssh: add diffie-hellman-group-exchange-sha256
Submodule src/golang.org/x/net 13f9640d4...ef20fe5d7:
  > http2: make Transport.IdleConnTimeout consider wall (not monotonic) time
  > html: implement adjusted current node and make parser support foreign fragment
  > html: remove "filterres" from svg attribute adjustments
  > html: support #script-(on|off) directives for tests
  > html: add Main support
  > publicsuffix: update table to latest list from publicsuffix.org
  > ipv4, ipv6: use SockFprog definitions from x/sys/unix
  > internal/socket: pass race detection if CGO is not enabled
  > netutil: fix goroutine error handling in test
  > internal/socket: tell race detector about syscall reads and writes
  > internal/timeseries: avoid storing numbers as durations
  > webdav: fix dropped test error
  > icmp: fix ListenPacket panic
  > http2: add missing test update from CL 200317
  > netutil: fix test to not t.Fatal from goroutine
  > http2: make CipherSuites validation error more verbose
  > html: port html5lib test data from html5lib/html5lib-tests
  > html: add Dialog support
  > nettest: use unixStrmDgramEnabled on AIX
  > idna: update tables to Unicode 12
  > ipv4: use unsafe.Sizeof on struct size, not pointer size
  > http2: fix test goroutine
  > ipv4: fix unsafe pointer conversion in parseInterface
  > ipv4, ipv6: add support for freebsd/arm64
  > ipv6: re-enable tests on Dragonfly
  > all: fix tests on dragonfly after ABI changes
  > http2: make Transport.NewClientConn respect Transport.DisableKeepAlives
  > http2: track unread bytes when the pipe is broken
  > http2: split cookie pair into separate hpack header fields
  > http2: do not sniff body if Content-Encoding is set
  > http2/h2demo: update README
  < [release-branch.go1.13] http2/h2demo: remove h2demo build constraint
  < [release-branch.go1.13] http2: fix memory leak in random write scheduler
  > http2: fix memory leak in random write scheduler
  > html: fix tokenizer error
  > html: add Tokenizer.Raw comment re byte offsets
  > all: adjust defs for Dragonfly BSD
  > http2/h2demo: deploy with Go 1.13
  > xsrftoken: escape colons
  > websocket: Add nhooyr.io/websocket to the deprecation message
  > http2/h2demo: remove h2demo build constraint
  > internal/socket: remove unused sizeofMmsghdr const
  > http2: end stream eagerly after sending the request body
  > all: fix typos
  > http2: correct ServeConnOpts.context's nil receiver check
Submodule src/golang.org/x/sys fde4db37a...915c9c3d4:
  > [release-branch.go1.14-std] cpu: restore doinit() in cpu_riscv64.go
  > [release-branch.go1.14-std] cpu: add basic support for GOARCH=riscv64
  < unix/linux: update Dockerfile to glibc 2.30
  < unix: disable ptrace on iOS
  < unix: fix epoll_event padding on riscv64
  < windows: add support for automatic delayed start in windows service
  < unix: remove nacl build tag from dirent code
  < unix: fix several staticcheck issues
  < windows: add CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT
  < unix: add riscv64 tag to endian_little.go
  < unix: add constants and types to work with Linux loop devices
  < unix: update Dockerfile to Linux 5.2 and Go 1.13beta1
  < unix: add missing dirent* helper functions on aix
  < unix: don't use syscall.ParseDirent
  < unix: add Getdents on dragonfly
  < unix: use ParseDirent in testGetdirentries
  < unix: fix nil pointer dereference in Getdirentries on 32-bit freebsd 12
  < unix: add missing import in readdirent_getdirentries.go
  < unix: fix Getdirentries emulation using Getdents on netbsd, openbsd
  < unix: add test for Getdirentries
  < unix: merge implementation for ReadDirent
  < unix: add support to get/set Linux capabilities
  < unix: correctly rename Val member in Sigset_t on freebsd
  < unix: add ptrace support for FreeBSD
  < unix: add AT_SYMLINK_FOLLOW const on openbsd
  < unix: add AT_SYMLINK_FOLLOW const on netbsd
  < windows: make CoTaskMemFree public
  < unix: remove net dependency
  < windows: allow determining real version number
  < unix: fix Getdirentries emulation using Getdents on netbsd, openbsd
  < unix: change the mksysnum master to point to stable/11 on freebsd
  < windows: rename some arguments to follow MSDN
  < windows: allow looking up well-known folder paths
  < windows: add OpenThread function
  < windows: add GetProcessId function
  < unix: fix Getdirentries on 32-bit freebsd 12
  < windows: expose GetCurrentProcessId function
  < windows: allow determining if manager is locked
  < windows: correct types and error values of internal GUID handling
  < windows: add Thread32{First,Next} funcions
  < windows: properly plumb sidtype into service creation
  < windows: add GUID handling functions
  < windows: add accessor for duration since boot
  < windows: add constants for access rights
  < windows: make it easier to iterate over groups and privileges
  < windows: delete mkerrors.go
  < unix: provide linux/riscv64 assembly for syscalls
  < unix: fix TestFchmodat on illumos
  < Revert "windows: make zsyscall_windows.go generatable on non-WSL env"
  < windows: make zsyscall_windows.go generatable on non-WSL env
  < windows: add GenerateConsoleCtrlEvent function
  < plan9: modify mkall.sh to support zsyscall*.go files generation
Submodule src/golang.org/x/text 342b2e1fb..4b67af870:
  > all: upgrade to Unicode 12
  > message/pipeline: skip test if the 'go' executable is not found
  > all: add go version to go.mod
Submodule src/golang.org/x/time 555d28b26..3af7569d3:
  > add lock for getting burst
  > rate: fix documentation of Limiter.ReserveN()
Submodule src/golang.org/x/tools 65e3620a7..c00d67ef2:
  > [release-branch.go1.14] go/analysis/passes/printf: allow %O in format strings
  > [release-branch.go1.14] go/analysis/passes/asmdecl: add support for riscv64
  > txtar: promote from internal
  > internal/lsp: only construct a cache when we need to
  > go/analysis/passes/lostcancel: fix typo
  > all: fix typo ("identifer" → "identifier")
  > internal/lsp/cmd: don't create .orig files for rename by default
  > internal/lsp: fix the return type of CodeAction()
  > internal/lsp: fix infinite recursion in CancelRequest
  > go/packages: add String methods for LoadMode
  > internal/lsp/protocol: fix type of WorkspaceEdit.Changes in tsprotocol.go
  > go/analysis/passes: ensure diagnostic-reporting analyses have exported Doc
  > internal/lsp: don't search other packages for unexported references
  > internal/lsp: reorganize the generated Go code for the lsp protocol
  > internal/lsp: fix variadic interface completion ranking
  > internal/lsp: fix panic in bestView
  > internal/lsp: fix panic when logging errors in snapshot.KnownPackages
  > cmd/godoc: don't execute go mod download when GOMOD is /dev/null
  > internal/lsp/testadata/rename: add a test case for renames across packages
  > internal/lsp: ignore AST errors when generating import edits
  > internal/lsp/source: add support for references in the same workspace
  > internal/lsp: use import path literal for documentLink range
  > internal/lsp/cache: add finer-grained control of file changes
  > cmd/benchcmp: add unit test for formatNs function
  > internal/lsp: use the versions provided by the client
  > internal/telemetry: make test event with functions
  > internal/lsp: change annotation tests to json
  > go/packages/packagestest: add package use example
  > lsp/protocol/typescript: add instructions for typescript compiling
  > internal/lsp: look up files in packages by position instead of URI
  > internal/lsp: use versioned URIs in rename and code actions
  > internal/memoize: propagate cancellation
  > internal/lsp/source: unify import adding code
  > gopls/doc: expand Emacs docs
  > internal/lsp: support implementations requests for implementations in other packages
  > go/packages: fix failing Windows TryBots for adhoc packages test
  > internal/lsp: handle the didChangeConfiguration message
  > internal/lsp: make View.SetOptions save and useful
  > tools/gopls: add cmd support for folding_ranges
  > internal/lsp/cache: avoid returning errors when building source.Errors
  > cmd/go-contrib-init: add unit test for the cmdErr function
  > internal/testenv: reject the resolved 'go' command if it does not match runtime.GOROOT
  > internal/lsp/cache: have NewView create view even if load all packages fails
  > go/analysis/unitchecker: add erroras analysis to align with go vet
  > internal/lsp: support implements for methods on an interface
  > internal/lsp/protocol: define types in alphabetical order in tsprotocol.go
  > internal/lsp: improve completion in append() calls
  > internal/lsp/source: start import diffs at byte 0
  > go/packages: ignore no packages error from (*snapshot).load in (*session).NewView
  > internal/lsp/cache: handle a nil pointer exception in analysis
  > internal/lsp: return completion item without documentation
  > internal/lsp: call load in (*session).NewView
  > internal/lsp/source: don't format the whole file when adding imports
  > internal/lsp: improve literal func completion candidates
  > internal/lsp: improve variadic completion
  > cmd/godoc: add initial support for module mode
  > gopls: control features for command line tests
  > internal/lsp/source: don't unconditionally name imports
  > go/internal/packagesdriver: report stderr when failed to determine types.Sizes
  > internal/imports: set import names on completion candidates
  > internal/lsp: add config flag to hide debugging output
  > internal/lsp/source: attach Package to completions when available
  > internal/lsp: add additional check for analysis value
  > internal/lsp: restore the rpc metrics
  > internal/lsp: fix the debug info pages
  > internal/lsp: add LocalPrefix configuration
  > go/analyis/passes/asmdecl: allow loading both parts of a complex with one instruction
  > internal/lsp/cache: only refresh imports cache every 30 seconds
  > internal/imports: cache GOPATH, exports
  > internal/lsp: use available type info for unimported completions
  > internal/lsp/source: propose exports for unimported packages
  > internal/imports: provide export completions for unimported packages
  > internal/lsp: fix race condition in metadata handling
  > cmd/bundle: add -tags flag
  > go/packages: fix loading of syntax when types not requested
  > internal/lsp: hardcode the version string on master
  > internal/lsp: fix nil pointer in textDocument/didClose
  > internal/lsp: do not format the file on import organization
  > internal/lsp/cmd: re-enable the definition cmd tests
  > internal/lsp/cache: recover from panics in analyses
  > internal/lsp/source: add a nil check on the identifier's object in implementation
  > tools/gopls: add cmd support for symbols
  > tools/gopls: add command line support for links
  > internal/lsp: revert to old method of computing error ranges
  > internal/lsp: enable go-diff by default
  > internal/lsp: enable textDocument/implementation request
  > internal/lsp/cache: don't close around actionHandle or snapshot
  > tools/gopls: add cmd support for signature
  > internal/lsp: add support for implements to the LSP
  > go/packages: add a timeout for TestLoadImportsC
  > tools/gopls: add command line support for suggestedfix
  > internal/imports: sort import candidates by "relevance"
  > internal/lsp/testdata: change test case to work around CL 202581
  > go/packages: print gopackagesdriver errors when GOPACKAGESPRINTDRIVERERRORS is set
  > internal/lsp: search candidate type's package for completions
  > internal/lsp: do not close over the handle in the memoize function
  > go/packages: handle "outside module root" error printed to stderr by go list -e
  > internal/lsp: remove the pkg.view field, in preparation for CL 204079
  > cmd/stringer: fix package godoc
  > internal/imports: set ctx.WorkingDir if such a field exists
  > tools/gopls: add command line support for imports
  > go/analysis/passes/printf: allow # for b flag
  > internal/lsp: type check packages in parallel
  > internal/lsp/cmd: use 'go-diff' by default in format command
  > Fix header level in settings.md
  > tools/go/analysis: Fix datarace in set of analysis.Fact
  > go/analysis: rename reportNodef to ReportRangef
  > go/packages: do not return from goListDriver with goroutines still in flight
  > go/analysis/passes/printf: return Result for querying func Kind
  > Revert "go/packages: temporarily disable some tests running on go tip with -race"
  > present: check if too few arguments to image, iframe, or video
  > internal/lsp: downrank untyped completion candidates
  > tools/gopls: add cmd support for references
  > internal/lsp: disable completion time budget in tests
  > internal/lsp: remove analyzers from Analyze result
  > internal/lsp: stop caching diagnostics on the package
  > internal/lsp: don't cache analysis.Pass on actionHandle
  > internal/imports: re-enable TestStdlibNotPrefixed
  > internal/imports: support vendoring in module mode
  > internal/imports: skip TestStdlibNotPrefixed
  > internal/lsp: improve completions in *ast.MapType
  > internal/lsp: fix fallback and error handling logic
  > internal/lsp: fix VSCode's reordering of completion candidates
  > cmd/digraph: use node instead of label ubiquitously
  > cover: significantly improve the speed of cover.ParseProfiles
  > internal/telemetry/export/ocagent: attach timestamps to metrics
  > internal/memoize: add a go:nocheckptr annotation to (*Store).get
  > internal/lsp: don't associate package with snapshot
  > internal/lsp: don't offer empty "Organize Imports" action
  > internal/lsp: improve completion for *ast.ArrayTypes
  > go/analysis/passes/inspect: fix incorrect example
  > internal/lsp: modify approach to watching changed files
  > internal/lsp: fix label completion in range and type switch stmts
  > internal/lsp: fix fuzzy matcher inconsistency
  > internal/lsp: trim down the fuzzy matcher library
  > internal/lsp: add some keyword completions
  > go/internal/gcimporter: use empty string for the top-level package path
  > internal/lsp: use the AST to get correct ranges
  > internal/lsp: cancel early
  > internal/imports: cache module information
  > internal/lsp: move error range computations into cache package
  > internal/imports: cache things outside the mod cache
  > internal/imports: return non-stdlib candidates from GetAllCandidates
  > go/packages: create Imports map when creating package
  > internal/lsp: return spanForRange function to fix build
  > go/analysis, internal/lsp: add support for related information
  > internal/lsp: refactor error handling code in type-checking
  > gopls: update go.mod file
  > internal/lsp: turn off go/packages debug logging
  > go/analysis/passes/printf: allow %x/%X for float/complex types
  > internal/lsp: fix race in checkPackageHandles
  > internal/lsp: associate package with its snapshot
  > tools/internal/imports: fix data race in packageInfo
  > go/packages: fix ad-hoc package tests
  > internal/lsp: fix bad *ast.ArrayTypes for completion
  > internal/lsp: add a test to make sure we handle bad imports
  > internal/telemetry/export/ocagent: convert Histogram metrics
  > go/expect: support markers in comments in go/packagestest
  > gopls/doc: fix issue links for vim-lsc
  > internal/lsp: search for deep completions across function calls
  > internal/lsp: don't qualify literal candidates in *ast.SelectorExpr
  > internal/lsp: add label completion candidates
  > internal/lsp: check if the go/packages context has been canceled
  > go/packages: fix staticcheck warnings
  > go/packages: handle invalid files in overlays
  > internal/lsp: remove misleading check span
  > go/analysis: remove requirement for unique Analyzer names
  > go/packages: handle multiple modules in gopackagestest
  > internal/lsp: fix lsp trace log format for gopls
  > internal/lsp: use the analyzer's pointer instead of name
  > internal/lsp: add analyses to the snapshot
  > cmd/present: fix origin mismatch for websocket when using HTTPS
  > go/packages: temporarily disable some tests running on go tip with -race
  > internal/lsp: cache analysis using memoize package
  > gopls/doc: instructions for adding settings in coc.nvim
  > internal/lsp/protocol: handle case of an otherwise empty notification
  > go/packages: make a copy of the config.Env slice in the test.
  > internal/telemetry: modify *Subscriber to take timeAt
  > internal/lsp: include context in go/packages config
  > internal/lsp: return an error from {Narrowest,Widest}CheckPackageHandle
  > internal/lsp: use options hooks to install diff driver
  > internal/lsp: fix unified diffs of edits at the end of a file
  > internal/lsp: fix test failures caused by diff algorithm variance
  > internal/lsp: remove edit fixups from rename now diff is functional
  > gopls: use go-diff for edit generation
  > internal/lsp: expand edits to whole lines in ToUnified
  > internal/lsp: merge diffing test data sets
  > internal/lsp: fix patch tests on builders
  > internal/imports: skip TestModeGetmodeVendor
  > ocagent: convert Int64Data and Float64Data metrics to *wire.Metric.
  > go/analysis/passes/asmdecl: remove amd64p32 support
  > internal/span: end of file is now last line +1
  > cmd/godoc: update findGOROOT
  > internal/lsp: stop cluttering logs with highlight errors
  > Fix vscode config to watch file changes
  > godoc/vfs/zipfs: fix godoc formatting
  > internal/lsp: clean up ApplyEdits
  > internal/lsp: cleanup the diff package
  > go/packages: update tests to reflect changes in golang.org/cl/198459
  > go/analysis/analysistest: fix nil pointer dereference when sorting facts
  > internal/lsp: convert comments to markdown before sending to client
  > go/internal/gcimporter: support Go versions < 1.11
  > go/internal/gcimporter: handle the possibility of a nil fileset
  > internal/lsp: cleanup the diff/myers package
  > internal/lsp: rewrite the unified diff handling
  > internal/lsp: move unified diff testing to the diff interface
  > internal/lsp: invert the diff dependencies so myers depends on diff
  > internal/lsp: allow the diff alorithm to be specified per view
  > go/gcexportdata: use IExportData when writing gcexportdata
  > internal/lsp: use dependencies in cache keys
  > internal/lsp: do not allow diff.ApplyEdits to be replaced
  > internal/lsp: restore "IsIncomplete" completion flag
  > internal/lsp: address staticcheck warnings
  > internal/lsp: don't overwrite suffix when inserting completion
  > all: fix broken links to LSP specification
  > blog: add support for optional analytics HTML
  > internal/lsp: delete unused code
  > go/ssa: make a setNumable interface
  > internal/lsp: rework snapshots and cache FileHandles per-snapshot
  > internal/lsp/protocol: generate correct log messages for 'exit' notifications
  > godoc/vfs: fix union logic in NameSpace.ReadDir
  > cmd/godoc: move poll sleep to top of loop
  > godoc, godoc/vfs: improve documentation of GetPageInfo, hasPathPrefix
  > cmd/godoc: convert tests to packagestest, cover third party packages
  > cmd/godoc: check if server exited when waiting
  > internal/lsp: add constant values to hovers
  > internal/lsp: change the unified diff tests to be less fragile
  > internal/lsp: run all the tests as sub tests
  > go/internal/gcimporter: support reading column details from export data
  > internal/lsp: lift the test loops out into the testing framework
  > use a golden file for the expected test counts
  > internal/lsp: provide option for case sensitive completion
  > internal/lsp: move the missing imports handling into the metadata
  > internal/lsp: improve completions in *ast.FieldList
  > go/analysis: fix vet errors
  > internal/lsp: fix scope of FuncType completion candidates
  > internal/lsp: remove filename print from rename output
  > internal/lsp: fix merge conflict and race condition
  > internal/lsp: remove duplicated enums
  > internal/lsp: add literal completions for basic types
  > internal/lsp: fix regeneration of golden files
  > internal/lsp/protocol: update to protocol version 3.15
  > internal/lsp/cache: move to a model of caching in a snapshot
  > internal/lsp: associate code action diagnostics with suggested fixes
  > internal/lsp: reorganize completion tests
  > godoc: remove Corpus.testDir field
  > internal/lsp: remove unnecessary "justOpened" field from goFile
  > internal/lsp: only cache type information for active packages
  > gopls: refactor the cmd tests
  > internal/lsp: cache multiple packages depending on parse modes
  > internal/span: handle invalid column values to avoid crashing
  > gopls/doc: fix typo in settings
  > gopls: adding static check to the new gopls module
  > internal/lsp: make the analyzers configurable per view
  > tools/gopls: add command line support for rename
  > internal/lsp: support running `go mod tidy` as a code action
  > gopls: add a hooks package
  > internal/lsp: make sure that deps are only checked in trimmed mode
  > tools/internal/tool: refactor tool.Main() for testabilty
  > internal/lsp: check the file's parse mode before formatting
  > internal/lsp: fix infinite recursion while fixing AST
  > cmd/vet: fix a bad case of shadow check about redeclaration
  > internal/lsp: support function literal completions
  > internal/lsp: fix bug in diagnostics for watched changed files
  > gopls: update go.mod for v0.1.7
  > go/packages: fix overlay deps for packages with test variants
  > go/packages: remove go.mod files
  > internal/lsp: change names used by per-folder configs
  > go/packages: fix a small spelling mistake
  > internal/imports: don't prefix stdlib package with std/
  > internal/lsp: ensure that an AST cannot be nil without an error
  > internal/lsp: add literal completion candidates
  > internal/lsp/source: add sortslice analyzer
  > internal/lsp: fix diagnostics to report for all available files
  > internal/lsp: show errors when the user is in the wrong directory
  > internal/lsp: distinguish parse errors from actual errors
  > internal/lsp: return errors from diagnostics
  > gopls/doc: add instructions for VSCode remote development
  > internal/lsp: remove helpers for getting packages
  > internal/lsp: fix vet errors
  > go/internal/gccgoimporter: update package to match std lib version
  > internal/memoize: changes to only one handle per key
  > internal/lsp: remove cachedFileToMapper function
  > internal/lsp: tighten up completion budget check
  > internal/lsp: reduce completion candidate volume
  > internal/lsp: use ParseGoHandles for the builtin package
  > internal/lsp: reduce usage of column mapper
  > internal/lsp: avoid unnecessary type checking
  > gopls: update go.mod
  > internal/lsp/debug: bump version number for release
  > internal/span: handle escaping file URIs
  > internal/lsp.protocol: identify the version of the LSP that code is generated for
  > internal/lsp: handle potential nil pointer
  > gopls/doc/vim.md: enable suppress_stderr for natebosch/vim-lsc
  > internal/lsp: fix error formatting directive
  > gopls/doc: add and make minor changes to documentation
  > internal/lsp: omit "iota" completion outside const decls
  > go/analysis: add sortslice pass
  > internal/lsp/protocol: bring the typescript code up to date
  > go/packages: suppress go list -e error when directory outside modules
  > internal/lsp: turn fuzzy matching and deep completions back on
  > internal/testenv: handle GOPACKAGESDRIVER=off in NeedsGopackage
  > go/packages: fall back to loading from export data if sources are missing
  > Fixed documentation for gopls installation
  > internal/lsp: update go.mod for next version
  > internal/lsp: use the view options, not the session options
  > gopls/doc: update config settings in documentation
  > go/packages: allow types loading without NeedDeps
  > internal/lsp: update gopls mod file
  > internal/lsp: merge session and view options into one
  > internal/lsp: prepare for tagged version
  > all: fix more typos
  > cmd/compilebench: add more linker benchmarking
  > internal/lsp: process configuration options more thoroughly
  > go/packages: add a test case for golang/go#33374
  > internal/lsp: treat completion documentation errors as actual errors
  > internal/imports: fix scanning GOROOT in module mode
  > internal/lsp: add ID to the package cache key
  > internal/imports: add all interfaces in mkstdlib
  > internal/lsp: start handling watched file deletes
  > internal/imports: fix mkstdlib, run for go1.13
  > internal/lsp: fix completion for nested *ast.BadStmt
  > go/analysis: copyedit doc.go
  > internal/lsp: only build a view when we have its configuration
  > internal/lsp: derive ASTs from type information
  > internal/lsp: simplify snippet config/generation
  > internal/lsp: add more flexible completion tests
  > internal/lsp: update to latest version of x/tools
  > internal/lsp: enable suggested fixes by default
  > internal/lsp: re-enable deep completions and fuzzy matching
  > internal/lsp: improve completions in go and defer statements
  > go/packages: ignore any go list errors that seem to come from cgo
  > internal/lsp: remove the GetToken and GetAST functions
  > internal/lsp/diff: rewrite ApplyEdits to work with sub-line diffs
  > internal/lsp: fixed a bug where GOPROXY was set to GOROOT
  > go/analysis: fix typos
  > x/tools/gopls: convert to the august, 2019 version of the LSP protocol
  > all: add a space before +build in build tag comments
  > internal/lsp: use protocol.TextEdits in suggested fixes
  > internal/lsp/cache: detail why the err is ignored
  > internal/lsp: don't lower score of builtin completions
  > internal/lsp: use protocol.Position for textDocument/prepareRename
  > internal/lsp: switch folding range to protocol ranges
  > internal/lsp: switch to using protocol positions for document symbols
  > internal/lsp: change to protocol.TextEdit for formatting
  > internal/lsp: move configuration options to structs
  > internal/telemetry/export/ocagent: fix typo in comment
  > x/tools/gopls: fix race condition in logging
  > internal/lsp: fold contained lines when lineFoldingOnly
  > internal/lsp: avoid invalid state due to context cancelation
  > internal/lsp: fix deadlock between f.mu and f.handleMu
  > internal/lsp/cache: add additional spans for tracing
  > internal/lsp/cache: fix race condition in type-checking
  > internal/imports: ignore invalid mod cache entries
  > internal/lsp: avoid using the importer's context as much as possible
  > internal/lsp: turn on completion documentation by default
  > internal/lsp: fix declarations in references
  > internal/lsp: fix deadlock in type-checking
  > go/ssa/interp: skip recover2 testcase
  > gopls: update x/tools version
  > internal/lsp: use memoize store's context when type checking
  > internal/lsp: return only multiline ranges when lineFoldingOnly
  > internal/lsp: add tests for nested folding ranges
  > gopls: fix typo in the design document
  > go/analysis/doc: fix stuff that was left out of the previous commit
  > go/analysis/doc: provide more motivation for suggestedfix design
  > go/packages: make sure to request dependencies when we NeedTypesInfo
  > internal/lsp/source: fixes completion for slice literals of pointers
  > all: skip more memory-intensive tests on linux-arm
  > all: do not write to testdata directories
  > internal/lsp: enable deep completion and fuzzy matching by default
  > all: skip tests if required tools are not found
  > x/tools/gopls: add fallback to default GOPATH if missing
  > internal/imports: skip scanned module cache dirs
  > go/packages,internal/lsp: skip memory-intensive tests on the linux-arm builder
  > internal/imports: use cache of mod cache pkgs in find packages
  > internal/imports: avoid walking dir for mod file in mod cache
  > internal/lsp: add prepare rename support
  > internal/lsp: add foldingRange support
  > go/packages: set GOPACKAGESDRIVER=off for all the tests
  > go/analysis/passes/printf: handle a potential nil pointer
  > go/packages: ignore Cgo compilation error correctly
  > x/tools/gopls: reimplement rpc logging at a lower level
  > internal/lsp: use protocol.Ranges for source.Identifier
  > go/analysis/cmd/vet: remove
  > internal/lsp: initialize CodeActionProvider with supported actions
  > internal/lsp: limit deep completion search scope
  > cmd/gopls: add documentation
  > internal/lsp: add tests at the diff hook layer
  > internal/lsp: start handling watched file change events
  > internal/lsp: add additional information when logging errors
  > go/internal/gcimporter: make safe for concurrent use
  > all: replace reference to plan9.bell-labs.com with 9p.io
  > godoc: apply gofmt
  > go/analysis: handle common nil pointers
  > internal/lsp: support renaming of import spec
  > x/tools/cmd/stringer: document -linecomment in the GoDoc
  > cmd/getgo/server: update to go112 GAE runtime
  > internal/lsp: use the explicit import spec name as ident
  > internal/lsp: return error when renaming within an import spec
@golang golang locked and limited conversation to collaborators Oct 17, 2020
@rsc rsc unassigned matloob Jun 23, 2022
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
None yet
Development

No branches or pull requests

4 participants