-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
While working on #54509, I encountered a surprising bug in go/packages: by renaming "golang.org/x/tools/internal/lsp" to "golang.org/x/tools/gopls/internal/lsp", it appears I pushed a go list invocation within our test setup past a windows limit for command line length:
https://storage.googleapis.com/go-build-log/0d6a7f9d/windows-amd64-2016_664249aa.log
(@adonovan found a reference citing a 32kb limit, which appears to be exceeded by the collective set of package directories in that test output).
Shortening our test module path resolved the failure (for now), but I expect we'll hit it again soon as we add more test data. Furthermore, our test data is certainly smaller than even medium-sized repositories, so it seems likely that our users are hitting this limit in practice.
Ideally, go/packages.Load should handle these limitations within the go list driver, perhaps by breaking up large queries.
CC @bcmills