syzkaller
syzkaller copied to clipboard
mod: bump golang.org/x/tools from 0.14.0 to 0.18.0
Bumps golang.org/x/tools from 0.14.0 to 0.18.0.
Release notes
Sourced from golang.org/x/tools's releases.
gopls/v0.15.0-pre.3
These are release notes for a prerelease version of gopls. v0.15.0 will be released soon, but please try the prerelease if you can!
go install golang.org/x/tools/[email protected]This release introduces "zero config" gopls, which is a set of heuristics allowing gopls to Do The Right Thing when you open a Go file. We believe this addresses the two largest pain points we hear about from our users: difficulty configuring multi-module repositories, and working on multiple GOOS/GOARCH combinations. However, this is a large change to the way gopls models your workspace, and the dynamic loading/unloading of builds may be surprising in some cases. Your feedback on this new feature is greatly appreciated. See below for more details.
New Features
Simpler workspace configuration and improved build tag support
The headline feature of this release is a rewrite of gopls's logic for associating files with build configurations that enables gopls to give accurate answers when navigating almost any Go source file on your machine.
Most features of gopls rely on type information, which comes not from the file in isolation but depends on the relationship between the file and the other files in its package, and between the package and all its dependencies; this in turn depends on go.mod and go.work files. In effect, gopls needs to decide which
go buildcommand--which working directory, package arguments, GOOS, GOARCH, build tags, and so on--would cause each file to be processed by the compiler.Previous versions of gopls only allowed one build per workspace folder, and users had to be careful to configure the right workspace root and build environment. As a result, users often encountered confusing error messages when they opened the wrong directory, or a file that was tagged for a different operating system or architecture--the dreaded "No packages found" error. This situation was improved by the introduction of
go.workfiles, but still required configuration and a preexisting understanding of the code being edited.With this release, gopls now allows multiple builds per workspace, and uses heuristics to automatically derive the set of active builds. Gopls will ensure that an active build contains every module with an open file in your workspace, adding new builds and GOOS/GOARCH combinations as needed to cover files that don't match the host operating system or architecture.
For example, suppose we had a repository with three modules:
moda,modb, andmodc, and ago.workfile using modulesmodaandmodb. If we open the filesmoda/a.go,modb/b.go,moda/a_windows.go, andmodc/c.go, gopls will automatically create three builds:
In some cases this may cause gopls to do more work, since gopls is now tracking three builds instead of one. However, the scalability redesign we first announced in v0.12 allows us to avoid most of this work by efficient caching in a persistent store.
So, all gopls' navigation, query, analysis, and refactoring features should work equally well in both files. Notably, you'll see compiler diagnostics for the appropriate build in real time, making it much easier to make changes to cross-platform code.
Preview refactoring edits
Refactoring code actions now support resolving edits. This update enables features like code action previews within VS Code (triggered by Ctrl+Enter).
To take advantage of this new gopls feature, clients must register support via:
{ "textDocument": { "codeAction": { "dataSupport": true, "resolveSupport": { "properties": ["edit"] } } } }Analysis & diagnostics
... (truncated)
Commits
c5643e9gopls/internal/server: fix two bugs related to dynamic configuration50b4f1bgopls/internal/golang: close open filef0ef3c6gopls: update x/telemetry dependency to fix crash8cf0a8egopls: record that v0.15 will be the last to support go1.18730dc3cgopls/internal/settings: add a hidden option to disable zero config95f04f4gopls/internal/golang: add resolve support for inline refactorings9619683gopls/internal/cache: treat local replaces as workspace modulesa5af84egopls/internal/cache: check views on any on-disk change to go.mod filesa7407fagopls: update telemetry314368dgo/analysis/passes/deepequalerrors: audit for types.Alias safety- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 62.7%. Comparing base (
23536c2) to head (b47a63f). Report is 17 commits behind head on master.
:exclamation: Current head b47a63f differs from pull request most recent head 2529918. Consider uploading reports for the commit 2529918 to get more accurate results
Additional details and impacted files
@dependabot rebase
Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!
If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.
@dependabot recreate
This PR makes me crazy. 2 equivalent ci/build tests return different result. Can we read it as a golangci-lint flakiness proof?
@a-nogikh , wdyt?
Not just flakiness (it's not that the linter tests pass/fail), but a bug in the linter implementation.
anic during analysis: runtime error: index out of range [1] with length 1, goroutine 17375 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x5e
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:105
Yes. I meant golangci-lint bug flakiness... One day I'll try to disable this linter once more. Previously used way to disable it didn't work.
The beautified log:
level=error msg="[linters_context/goanalysis] nilness: panic during analysis: runtime error: index out of range [1] with length 1, goroutine 17375 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func1()
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:105 +0x5a
panic({0x174db40?, 0xc0018804e0?})
/usr/local/go/src/runtime/panic.go:914 +0x21f
honnef.co/go/tools/analysis/facts/nilness.impl.func1({0x1a6d358, 0xc00b0b8000})
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/honnef.co/go/tools/analysis/facts/nilness/nilness.go:160 +0x891
honnef.co/go/tools/analysis/facts/nilness.impl.func1({0x1a6d288, 0xc00b09cc80})
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/honnef.co/go/tools/analysis/facts/nilness/nilness.go:147 +0x8e7
honnef.co/go/tools/analysis/facts/nilness.impl(0xc00ed2f2b0, 0xc00585c3c0, 0xc00bd2dcb8)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/honnef.co/go/tools/analysis/facts/nilness/nilness.go:246 +0x348
honnef.co/go/tools/analysis/facts/nilness.run(0xc00ed2f2b0)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/honnef.co/go/tools/analysis/facts/nilness/nilness.go:66 +0x110
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyze(0xc00627e730)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:195 +0x9d6
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe.func2()
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:113 +0x17
github.com/golangci/golangci-lint/pkg/timeutils.(*Stopwatch).TrackStage(0xc001783090, {0x17c443e, 0x7}, 0xc005936748)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/timeutils/stopwatch.go:111 +0x44
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*action).analyzeSafe(0xc001cb3860?)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_action.go:112 +0x7a
github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze.func2(0xc00627e730)
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:80 +0xa8
created by github.com/golangci/golangci-lint/pkg/golinters/goanalysis.(*loadingPackage).analyze in goroutine 4085
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/golangci/golangci-lint/pkg/golinters/goanalysis/runner_loadingpackage.go:75 +0x205
"
@dependabot recreate
Superseded by #4555.