go-mode does not use go-mode-load now.
Need to use go-mode-autoloads instead.
Change-Id: I3ee2113b41972a1f700d604ea7a6c2d5b59da8bb
Reviewed-on: https://go-review.googlesource.com/42193
Reviewed-by: Alan Donovan <adonovan@google.com>
Manually apply same change as CL 41822 did for cmd/go/internal/get,
but for golang.org/x/tools/go/vcs, to help keep them in sync.
Updates golang/go#18660.
Helps golang/go#11490.
Change-Id: I6c7759c073583dea771bc438b70f8c2eb7b5ebfb
Reviewed-on: https://go-review.googlesource.com/42017
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This reverts commit 3aa1caa08a.
Reason for revert: benchstat is preferred to benchcmp
Change-Id: I9772eb342fb631a68511986d832bb1444766afdc
Reviewed-on: https://go-review.googlesource.com/42027
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This package has been moved since then.
Change-Id: Ibf0044cf4fcef47ae15301c2880ff129a8829516
Reviewed-on: https://go-review.googlesource.com/41856
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
A go/build change in Go 1.9 (CL 33158) allowed for a better expected
error message for "nonexistingpkg" case. CL 37768 did that. However,
that shouldn't be done for Go 1.8 and older, since they don't have
the corresponding go/build change.
So, if the version is Go 1.8 or older, allow matching those previous
expected outputs (before CL 37768) for "nonexistingpkg" case.
Move test cases for TestCLI from a package-level variable into TestCLI
itself. This is more readable, and isGo19's value is ready in time.
Fixesgolang/go#20122.
Change-Id: I5e80600a75176d9e54ffebb7730849e381568316
Reviewed-on: https://go-review.googlesource.com/41810
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Backport of CL 41619.
Generated by copying bimport.go and reverting
the chunk containing the "This file is a copy"
comment near the top.
Fixesgolang/go#20121
Change-Id: If24c97d01a550318ab919c37cd0c4a8f34d776c7
Reviewed-on: https://go-review.googlesource.com/41756
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sometimes, as with CL 41493, or when investigating
a reported issue, there's a package of interest
that is not part of the standard compilebench suite.
Add a -pkg flag to allow easy access to the compilebench
set of goodies (allocs, object file stats) without
having to edit and reinstall compilebench itself,
which is what I have been doing.
Change-Id: Id6ca6356cae062208f8686c0cb597ed45fc861c0
Reviewed-on: https://go-review.googlesource.com/41627
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Insert line numbers via a ::before pseudo-element so you can't select
them when you copy text. See the code comment for more information.
Fixesgolang/go#20077.
Change-Id: I24a5b17786a52c8107b4f830e824526ba03bc38d
Reviewed-on: https://go-review.googlesource.com/41418
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(specifically: strings.Count, testing.callerEntry)
The interpreter tests were very useful for finding bugs during
development of go/ssa but now seem to be all cost and no benefit.
It may be time to delete this package.
Change-Id: I22348be9fb37bb0fd0c572c3e6f57e70fc069e02
Reviewed-on: https://go-review.googlesource.com/40871
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
godoc once again adds anchors for variable and constant
declarations. Individual declarations and lists of declarations are
both covered.
Fixesgolang/go#19894
Change-Id: If5f8f0c3429774f33535e2e654685ba5d71937f1
Reviewed-on: https://go-review.googlesource.com/40300
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
And avoid assumptions about the contents of the standard hash/fnv
package.
Change-Id: I10cc95ac6e3b482da5b027d68ff218d08f425e89
Reviewed-on: https://go-review.googlesource.com/40870
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This means that running stringer should always
have the intended effect, without having to
go install the package first, which was a common
source of confusion.
The source importer is marginally slower,
but stringer is run infrequently,
and we're only typechecking one package (and fmt),
not an entire tree, as vet does.
Fixesgolang/go#10249
Change-Id: Ib8cde29bd6cc596964dbe7348065932dd59075fc
Reviewed-on: https://go-review.googlesource.com/40403
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Robert Griesemer <gri@golang.org>
The GOPATH environment variable is defined at
https://golang.org/cmd/go/#hdr-GOPATH_environment_variable as:
> The GOPATH environment variable lists places to look for Go code. On
> Unix, the value is a colon-separated string. On Windows, the value is
> a semicolon-separated string. On Plan 9, the value is a list.
It is legal for Go packages to be in any of those places, not only
the first entry. Look in all places for golang.org/x/tools repository.
Cache the directory that is found. It's slightly more expensive
to look for it, since potentially multiple directories must be
checked for existence.
Updates golang/go#19400.
Change-Id: I16661b7149d52ea6168fffc605c842d7a4da009b
Reviewed-on: https://go-review.googlesource.com/38778
Reviewed-by: Michael Matloob <matloob@golang.org>
Importer "source" does not exist in Go 1.8, so this means that
default usage of gotype is broken in that compiler version.
Change-Id: I517520b0cac7c62a3e213d0647a3d621e8ced58c
Reviewed-on: https://go-review.googlesource.com/40091
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
In some cases walkFn is being called after the fastWalk function has
returned. This often happens when an error was encountered early on in
scanning directories with many entries.
It is caused by fastWalk not waiting for its workers to complete their
work. A sync.WaitGroup is used to wait for all workers to finish when
the function returns.
Updates golang/go#16399
Change-Id: I695d30c18e4878b789520b9d8a650f9688d896ac
Reviewed-on: https://go-review.googlesource.com/40092
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Apparently there was a typo during initial import,
and compilebench was placed at the top level,
rather than in the cmd subdirectory. Oops. Fix that.
Change-Id: Ibea9ed132dca26c022ea02933defec9534105f18
Reviewed-on: https://go-review.googlesource.com/39792
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
When the -count flag is provided,
instead of having each run overwrite the previous profile,
add a count suffix to the profile filename.
Then you can combine the profiles with
go tool pprof `go tool -n compile` <all profile files here>
This allows generation of precise profiles,
even for fast-compiling packages.
Change-Id: I006cf8fad143346b28a646a0b3582cc0f6eec310
Reviewed-on: https://go-review.googlesource.com/39718
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Instead of running make.bash, run 'go build -a std cmd'.
Change the benchmark name to reflect this.
This does roughly the same task, namely compile and link
all the code in the tree, but with several advantages:
* It works cross-platform.
* It is a bit faster, while measuring the same fundamentals.
* It doesn't measure how fast the bootstrap compiler works,
which is irrelevant.
* If interrupted, it leaves the current Go installation
in a usable state.
Change-Id: I469b1d032b48b06e3dea021bd031283bc3a16ff4
Reviewed-on: https://go-review.googlesource.com/39714
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
There's a surprising amount of variety
in the drivers of compilation speed.
It's helpful to have a variety of packages here.
For example, archive/tar exhibits golang/go#19839
much more than the others.
Change-Id: If66b332d63427fb246305cb14cfee9ef450bcdcf
Reviewed-on: https://go-review.googlesource.com/39713
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This CL is an import of compilebench from rsc.io/compilebench
at commit 1a5bec7724500bd6df47e053dbc42b41fe653372.
This CL brings in only main.go, unaltered.
The other files were:
* LICENSE: now unnecessary
* README.md: now unnecessary
* compilecmp: still available at its original home,
soon to be superceded by a new tool in x/tools
Once compilecmp is available in x/tools,
I will replace rsc.io/compilebench with a breadcrumb repo.
All outstanding pull requests against rsc.io/compilebench are from me.
They will be closed, and new CLs sent here as appropriate.
Change-Id: Ic436abf4a662173c6c184bc765b1b9cab13b3cfb
Reviewed-on: https://go-review.googlesource.com/39712
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Linking cmd for android requires a cross-compiling toolchain,
which is not standard fare.
Skip it, and trust that the other platforms will pick up the slack.
Change-Id: Ifcf74f77e98489c859805ab7a448d80d019f3d20
Reviewed-on: https://go-review.googlesource.com/39556
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
At some point we switched tip.golang.org to run in GKE, which
terminates TLS directly on port 443. This requires a new technique
for detecting a plain HTTP connection. In addition we may want to run
talks.golang.org on App Engine Flex, which uses an X-Forwarded-Proto
header to indicate HTTP, so let's prepare for that possibility.
Fixesgolang/go#19759.
Change-Id: Iddc567214c5d28f61c405db065aa1b3f2c92fd85
Reviewed-on: https://go-review.googlesource.com/38800
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Change-Id: Ia12ff7a0f6898f8d140565d255793904ce8585c4
Reviewed-on: https://go-review.googlesource.com/38754
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Change-Id: Ie19a60595862c0afff9364ee21dd9598370e6c91
Reviewed-on: https://go-review.googlesource.com/38752
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This is already tested in the std library. Ok to take the easy way
out here.
Change-Id: Ie17e16fddba827bfe279e1f790006b3874f830ad
Reviewed-on: https://go-review.googlesource.com/38455
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This fixes several issues:
* The ls sed hackery generates GOARCH values mipsx and mipsxle,
instead of mips, mips64, mipsle, and mips64le.
* It removes the dependence on the 9 command.
* It marginally increases readability.
Change-Id: Ie46abc289c2c9923eed693dcf1194f4fd3ea9bd2
Reviewed-on: https://go-review.googlesource.com/38347
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
In golang.org/cl/38089, I removed all of the prog.go files.
Change-Id: I4d8dd021a62b5d6d8b7cb5cfe0ecd7268812805c
Reviewed-on: https://go-review.googlesource.com/38432
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The runtime cannot be compiled with optimizations disabled.
This lead to very confusing error messages
when toolstash -cmp failed.
Change-Id: Ie341d633ff9b26693b475957309591ff0757f1ab
Reviewed-on: https://go-review.googlesource.com/38378
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This allows URLs like golang.org/wiki/DevExp/, where before only
golang.org/wiki/DevExp was accepted.
Fixesgolang/go#19432.
Change-Id: Ie41a4fe1d1930fd947c1d0523060d08c7c6d6d39
Reviewed-on: https://go-review.googlesource.com/37882
Reviewed-by: Jaana Burcu Dogan <jbd@google.com>