On loong64 stack pointer register (SP) is R3 and link register is R1.
Updates golang/go#46229
Co-authored-by: Meidan Li <limeidan@loongson.cn>
Change-Id: I5a47e53846a24934f786655dbe2c2b164aece5c4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/356089
Run-TryBot: Ian Lance Taylor <iant@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
The JSON-RPC 2.0 protocol requires that responses objects
have either a "result" or an "error", but not both.
In Go, this corresponds to a non-nil result interface value or a
non-nil error.
However, the generated wrappers for the LSP protocol were passing
non-nil values for both in case of error, due to passing typed-nil
pointers as (non-nil) interfaces (see
https://go.dev/doc/faq#nil_error).
This change fixes the generator to explicitly pass only one or the
other, and re-runs the generator at the existing commit.
For golang/go#49387
For golang/go#46520
Change-Id: I582b52820bdac15d9f947e8d6c1e9daa70c53e40
Reviewed-on: https://go-review.googlesource.com/c/tools/+/388600
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
On neovim 0.7-dev `apply_workspace_edit` needs the encoding.
This PR updates the organize imports documentation example.
This does not break neovim v0.6+. Haven't tested in <=v0.5.
refs https://github.com/neovim/neovim/issues/14090
Change-Id: I82a08c54dd94e6aacb5aa30a19a1fa209ef5264b
GitHub-Last-Rev: f4072a0eec9c14a0efd618c1835e0d99c4a2d6f4
GitHub-Pull-Request: golang/tools#375
Reviewed-on: https://go-review.googlesource.com/c/tools/+/390417
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
The documentation for jsonrpc2.Replier states that
“[i]f err is set then result will be ignored.”
jsonrpc2_v2 documents no such affordance, and the JSON-RPC 2.0
protocol explicitly requires that the result “MUST NOT exist if there
was an error invoking the method.”
Although CL 388600 already avoids returning values in case of error
(which may also help with escape analysis and/or allocation
efficiency), it seems simplest and least confusing to make the
semantic difference between the jsonrpc2.Handler and
jsonrpc2_v2.Handler explicit in the code.
For golang/go#46520.
Change-Id: If13eb842505d42cbc51c01f5f5e699a549a3a28b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/400054
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs. This is the leftovers.)
For golang/go#51082.
Change-Id: Id9d440cde9de7093d2ffe06cbaa7098993823d6b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399363
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs.)
For golang/go#51082.
Change-Id: I58a534f3e518dad2d3a867f81b08a551a76bd423
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399362
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs.)
For golang/go#51082.
Change-Id: I5e11f2946001b9b36b7bd3af4d42da9dcea7494f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399361
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs.)
For golang/go#51082.
Change-Id: I229b90365998244cfa858ae678382f6089b1cdb9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399360
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs.)
For golang/go#51082.
Change-Id: I77809c80838cc8f4cdf43c3c42685e2fc695328a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399359
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs.)
For golang/go#51082.
Change-Id: Ife11502fe1e59a04d53dba9edccd3043e57f9ae8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399358
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs.)
For golang/go#51082.
Change-Id: I0cc2e6cac2e4ed975770aea78cc2f39c13d6f874
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399357
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Helper type logic did not handle properly pathological recursive types
such as type B *B. This CL addresses that.
For golang/go#51560
Change-Id: Ibb69ac68d77fc3956b98c701f17d28b9f30ac22c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399674
Reviewed-by: Tim King <taking@google.com>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
Auto-Submit: Zvonimir Pavlinovic <zpavlinovic@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Gofmt to update doc comments to the new formatting.
(There are so many files in x/tools I am breaking up the
gofmt'ing into multiple CLs.)
For golang/go#51082.
Change-Id: Ibb9d8a38c0bf6973419cb1efc13f0775000a607a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399364
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Order of evaluation is lexical left-to-right order. Emit the Low subexpression before High subexpression when building an *ast.Slice.
Fixesgolang/go#52142
Change-Id: If56a1c9ac12485717d2783efdf791fe24582b306
Reviewed-on: https://go-review.googlesource.com/c/tools/+/398057
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Running go mod vendor can result in vendor/modules.txt being transiently
deleted while it is being updated. On Windows this introduces potential
problems with file locking, if modules.txt is being read by another go
process, such as an ongoing package load.
Change the command to use RunGoCommandPiped, which executes serially
within the gopls process.
For golang/go#49646
Change-Id: If2d1fe5431122ba05014051a0e9c303cf7ee9cb2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399714
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
When polling for on-disk file changes, we must detect changes even if
there is no change in the file since the last polling.
The reason for this is that there could have been intermediate changes
to the file that affected our calculations, and those calculations must
be invalidated.
For golang/go#51930
Change-Id: I92f5c34f982970d8386fddfaa22b82ba471e22e7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/399625
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Instantiates calls to generic functions and methods from non-generic functions.
Testing against all of the compilable $GOROOT/test/typeparam/*.go tests. Adds stubs for standard libraries.
This is not yet building the bodies of the instantiated functions.
Updates golang/go#48525
Change-Id: I7e2c103c547edefb833a6930270b3137f89f1977
Reviewed-on: https://go-review.googlesource.com/c/tools/+/397854
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Updates golang/go#48525
Change-Id: I028ee12c2b85bb4c1761e5255711eaab52912491
Reviewed-on: https://go-review.googlesource.com/c/tools/+/397794
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
Trust: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Adds [unexported] fields to Function for Origin, TypeParams, and TypeArguments. Populates TypeParameters for package level functions and methods.
Adds datastructures for creating function instantiations. Tracking unique instantiations on Program.
Adds map for canonicalizing lists of types.
Updates golang/go#48525
Change-Id: I9cb01f2ed24a9cacf3a515444d0cc0474333e417
Reviewed-on: https://go-review.googlesource.com/c/tools/+/397714
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
DeleteNamedImport used FileSet.Position() where it should have
used FileSet.PositionFor(, false) to ignore line directives.
There are likely many more of these panics lurking in x/tools.
Change-Id: I11fc0ea5301fe873cb679a82e231b1720dbdaef6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/398596
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Trust: Peter Weinberger <pjw@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This test is somewhat noisy on the builders.
I'd like to skip it until someone can look into it in more depth.
For golang/go#51352.
Change-Id: I2aa5c9c279807b57872324d84c1bb585cdf34d06
Reviewed-on: https://go-review.googlesource.com/c/tools/+/398699
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Upgrade staticcheck to v0.3.0 to pick up support for generics. Since
this version only supports Go 1.17+, increase the version at which we
install staticcheck to 1.17 (from 1.15). This change is likely to cause
confusion for users on Go 1.16, so show a warning when setting
the "staticcheck" option to an unsupported value. Slightly refactor our
setting of options along the way.
Fixesgolang/go#52159
Change-Id: Id9b4cee340e31988c64ca712d98573343aaf5848
Reviewed-on: https://go-review.googlesource.com/c/tools/+/396974
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Trust: Peter Weinberger <pjw@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Fixes: golang.org/#52024
Change-Id: Ib79a839f9bdeaef1250925add69dea3ae32e1cae
Reviewed-on: https://go-review.googlesource.com/c/tools/+/397479
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Peter Weinberger <pjw@google.com>
Changes the builder to be stateful and track the Functions that were created while building the current Package [or MethodValue]. Additional bookkeeping is now done whenever a synthetic functions is created.
Adds an additional state to Function to track if it is done with the BUILD phase.
Moves (*Program).needsMethods from emitConv to a postprocessing phase in package BUILD phase.
Clarifies that anonymous functions are done at the same time as their parent.
Updates golang/go#48525
Change-Id: I09d1ed2abc95d252029917f49f783a3cfd9f0a78
Reviewed-on: https://go-review.googlesource.com/c/tools/+/396876
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
This is a minimal fix for the reported panic. The existing code
used FileSet.Position() where it should have used FileSet.PositionFor(, false).
gopls does this in lots of places; each use of Position() needs to
be thought about.
x/tools/go/ast/astutil/import.go:273,274 is another example.
Fixes: golang/go#51916
Change-Id: I42de6affca2c97c09efb7974a9e44322556b3ffd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/398395
Run-TryBot: Peter Weinberger <pjw@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Trust: Peter Weinberger <pjw@google.com>
The directory for the vulncheck command is passed
as an argument. Use the specified directory
in the configuration.
Change-Id: I1824b308701fd30548efa8bec7452de1fdf76bb9
Reviewed-on: https://go-review.googlesource.com/c/tools/+/398394
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Change-Id: I13cf73d7e043dda1a06c28bb09e413a76a68df1f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/391934
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
This test produces apparent file corruption on all of the
windows/arm64 builders. I suspect that this is a low-level bug (in
either the platform itself or the Go standard library on
windows/arm64).
Since windows/arm64 is not yet a first-class port, this test can be
skipped for now. However, if windows/arm64 becomes a first-class port
the underlying file-corruption bug should be investigated and fixed.
Updates golang/go#50706.
Change-Id: I0bc80cefee50895d40acc658286eb7ef8790493a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/397996
Reviewed-by: Russ Cox <rsc@golang.org>
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
When using gopls remote, existing go env vars are injected in the
initialize message. Setting GOWORK explicitly will impact cmd/go
invocations, for example "go list" during package load. The reason it
impacts is that gopls manually sets PWD to fix paths returned by cmd/go
if the working directory is inside a symlinked directory.
By only propagate GOWORK when it is explicitly set we will ensure that
the behavior is the same when running with or without remote.
See golang/go#51823.
Fixesgolang/go#51825
Change-Id: I6280aa7d8208e5aee269f19356668c7713e9f0a4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/394054
Trust: Pontus Leitzler <leitzler@gmail.com>
Run-TryBot: Pontus Leitzler <leitzler@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Current implementation returns incorrect result when some of the items are skipped, because positions could be relative to a skipped item. Instead, each position must be relative to the previous item added to the result.
Change-Id: I3c1a68d37bf0c9cfc1bccfe6f76c25b536224293
GitHub-Last-Rev: 6eedc7cbcc27f47ed5742b340f4438291ab70863
GitHub-Pull-Request: golang/tools#376
Reviewed-on: https://go-review.googlesource.com/c/tools/+/396715
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
Trust: Peter Weinberger <pjw@google.com>
Trust: Suzy Mueller <suzmue@golang.org>
internal/gopathwalk.walk remove an unnecessary call to os.Lstat when
checking if a symlink should be traversed. And remove a call to
filepath.EvalSymlinks that should be unnecessary as we are using
os.Stat to compare files.
Change-Id: Ie5ad1cb99cbd6d62f08f2b482a3e84b6fe41114d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/392095
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Removes the forced conversion of the Index field in Index and IndexAddr to type int. ssa/interp now intprets indices as int64s instead of ints.
Converts untyped indices for strings to ints before the lookup.
Fixesgolang/go#50949
Change-Id: Ib5d7f1ad28728d16c8e0a8411014d1209c62a3f2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/387996
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Tim King <taking@google.com>
The Run function is necessary for an analyzer, if left a nil Run, the runner will panic in run-time(singlechecker.Main, etc).
Change-Id: Ibbeea2d8c740f73e6c083647df6ded445036e272
Reviewed-on: https://go-review.googlesource.com/c/tools/+/329451
Trust: Carlos Amedee <carlos@golang.org>
Reviewed-by: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Implements reflect.DeepEqual() for testing interp packages. Adds test that exercises this.
Fixes a nil pointer dereference in ext۰reflect۰Value۰Elem in interp.
Updates golang/go#48525
Change-Id: Ib32e96d37aa5c85cefe59e9514d4e162d7f7011e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/391314
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Tim King <taking@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Tim King <taking@google.com>
Vulnerability entries that do not have call traces are
considered false-positives by govulncheck.
Change-Id: I50d7fc815723038e904805213cd039a05934a469
Reviewed-on: https://go-review.googlesource.com/c/tools/+/396434
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
When called from IImportBundle, the current code returns
a message saying:
cannot import "" (actual error) ...
That looks like the user has somehow caused an invalid import path
to be passed, which is not the case. Skip the wrapping in the bundle case.
Change-Id: I6cdb83911d18501895671fc70d87c2519f0570a3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/310514
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
If this code is misused, the result of the assert is
panic: assertion failed
This CL replaces the panic text with a useful message.
Change-Id: I3710ebe975e7f1e907b0378e9c67dd0c224492fb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/310513
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
If we need the export file, can't use -find,
which stops the go command too early.
Change-Id: I82adca728e3e8a2435cddad14cfed97665ea4234
Reviewed-on: https://go-review.googlesource.com/c/tools/+/310510
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
I haven't figured out exactly how to exercise it,
but the code as written is clearly wrong.
Change-Id: I8849bc37210d08ad8ae3bc857a84ae55b34908a5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/310511
Reviewed-by: Austin Clements <austin@google.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
I'm going to use NeedExportFile in the go/gcexportdata example,
and we might as well start with the correct spelling.
Leave behind a deprecated alias to preserve compatibility.
Change-Id: Id26e5db58cb59a01ed7904ab801a894ea76edd9e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/310509
Reviewed-by: Austin Clements <austin@google.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
beginFileRequest returns a nil error when file request url is
not a valid file url format. This is reported with a separate 'ok'
boolean return value.
This bug caused custom gopls commands to return success with
an empty result, instead of reporting the problem as an error.
Change-Id: I8eed39368087fa9928bcc68853225ea432f500d2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/395814
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
We do a lot of gymnastics to format var types, working around the lack
of alias tracking in go/types. As part of this, we clone and qualify
expressions. In this case, we were not qualifying identifiers that were
contained within fields or field lists.
Fix this by updating our expression traversal to include *ast.Field and
*ast.FieldList.
Fixesgolang/go#50539
Change-Id: I6531c6a51aa402bd784778b8bedaa3dccee75af0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/395678
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>