1
0
mirror of https://github.com/golang/go synced 2024-09-30 16:08:36 -06:00
Commit Graph

721 Commits

Author SHA1 Message Date
David R. Jenni
9e72de2cfb cmd/gorename: fix test failure formatting.
Change-Id: Idbfb356225f4650446bffa80a43cec4679bcd507
Reviewed-on: https://go-review.googlesource.com/75976
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-11-06 14:18:16 +00:00
griesemer
032dfd515a cmd/toolstash: don't try comparing "asm -V=full" output.
Added link as well, since they are all symmetric.

Follow-up on https://go-review.googlesource.com/c/tools/+/75670.

For golang/go#22552.

Change-Id: I12d951b800cd5fc7abc6d09e6a8a986e3f9f6936
Reviewed-on: https://go-review.googlesource.com/75672
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-11-02 22:54:56 +00:00
Matthew Dempsky
d620ba0fbb cmd/toolstash: don't try comparing "compile -V=full" output
Fixes golang/go#22552.

Change-Id: I2a31cf4fe85f33068502102031ed62f06abb6d6e
Reviewed-on: https://go-review.googlesource.com/75670
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-11-02 22:39:47 +00:00
Cherry Zhang
e4b401d06e cmd/toolstash: pass -c=1 in the second compilation
When toolstash -cmp found diff, it does a second compilation
with extra flags -v -m=2, which are imcompatible with the
concurrent backend. Pass -c=1 in the second compilation.

Change-Id: I3c77069936da1829b68375a4a6c7f9bbe364247c
Reviewed-on: https://go-review.googlesource.com/60390
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-10-10 17:47:39 +00:00
Carl Johnson
e00c182679 present: Scale down slides on smaller displays
On mobile and tablets, it was very difficult to view slides because the
slides were not designed to be smaller than 1250x750.

This adds a function to the JS that uses CSS scaling to make the slides
fit on smaller displays.

Fixes golang/go#21643

Change-Id: I68e9e2c1274aaf6396bf01d19ca023cddf76e2ec
Reviewed-on: https://go-review.googlesource.com/60270
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Francesc Campoy Flores <campoy@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Francesc Campoy Flores <campoy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-08-31 21:56:44 +00:00
Dmitri Shuralyov
5831d16d18 cmd/callgraph: fix "import path of the enclosing package" example in usage
Caller is *ssa.Function. Its Pkg field is *ssa.Package. But ssa.Package
struct doesn't contain either field or method named Object.

So one gets the following error:

	$ callgraph -format '{{.Caller.Pkg.Object.Path}} -> {{.Callee.Pkg.Object.Path}}' \
	    $(go env GOROOT)/src/net/http/triv.go | sort | uniq
	callgraph: template: -format:1:9: executing "-format" at <.Caller.Pkg.Object.P...>: can't evaluate field Object in type *ssa.Package

ssa.Package contains Pkg field:

	Pkg     *types.Package    // the corresponding go/types.Package

types.Package contains Path() method that returns the package path.

That appears to be the right way to get the "import path of the
enclosing package" with the current x/tools/go/ssa API.

Fixes golang/go#20459.

Change-Id: I3cb7b61b767148f5c771d57f8f5e7e6ab20aea87
Reviewed-on: https://go-review.googlesource.com/43812
Reviewed-by: Avelino <t@avelino.xxx>
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-08-08 14:46:45 +00:00
Jaana Burcu Dogan
fcc44a6330 cmd/getgo: add a user-agent to download requests
Change-Id: Ic8fa61e53e2d06a02b06b685bd1082423df00825
Reviewed-on: https://go-review.googlesource.com/52530
Run-TryBot: Jaana Burcu Dogan <jbd@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-01 21:43:54 +00:00
Brad Fitzpatrick
3fd990c6be cmd/tip: fix the build
https://golang.org/cl/52390 was submitted too early with failing trybots.

This fixes it, hiding the cloud.google.com stuff behind a build tag,
used by the Dockerfile but not the Go build system.

Change-Id: I66c6b40d4b06bf6c763f3ab221c7997856bfc910
Reviewed-on: https://go-review.googlesource.com/52470
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jessie Frazelle <me@jessfraz.com>
2017-08-01 18:51:51 +00:00
Brad Fitzpatrick
d07a458d9a cmd/tip: add a cert cache, clean up Kubernetes config, use update-deps
Fixes expired cert issue too, either by virtue of newer autocert, or
that we're no longer hitting some LetsEncrypt rate limit.

But we have a cache now at least, so we should be nicer to LetsEncrypt
when the process dies. I did see some process crashes (old?) in the
logs. So maybe we were crashing and re-hitting LE often.

Verified that the cert now expires:
    Sunday, October 29, 2017 at 9:57:00 PM Pacific
and that it's cached in GCS.

Fixes golang/go#21251

Change-Id: I3def551ae8eef5df0ec7c51927c4d4bb52cd7a6a
Reviewed-on: https://go-review.googlesource.com/52390
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Jessie Frazelle <me@jessfraz.com>
Run-TryBot: Jessie Frazelle <me@jessfraz.com>
2017-08-01 15:37:25 +00:00
Jaana Burcu Dogan
9badcbe49b cmd/getgo: prompt warning if an earlier installation exists
There is nothing else we can do other than just showing a
message that user need to remove it from their PATH not
to conflict with the current installation.

Fixes #21217.

Change-Id: Ie65385f4d536d5bb789387ba0229f54f2ee793f0
Reviewed-on: https://go-review.googlesource.com/51930
Run-TryBot: Jaana Burcu Dogan <jbd@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-07-31 22:15:19 +00:00
Chris Broadfoot
f2b3bb0049 cmd/getgo: fix builds
A couple fixes:

* Disable integration tests in short mode.
* Remove import of "google.golang.org/appengine" package. App Engine has
two ways to create an app: as a main package and calling
appengine.Main(), and as any regular Go package with handlers registered
in init().

Change-Id: Ib416111786c1c86cf428d91c60dc406c251d3ca1
Reviewed-on: https://go-review.googlesource.com/52211
Run-TryBot: Chris Broadfoot <cbro@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jaana Burcu Dogan <jbd@google.com>
2017-07-31 18:28:23 +00:00
Jaana Burcu Dogan
001b4ec819 cmd/getgo: have consistent messages
Currently, we output:

The latest go version is go1.8.3, install that? Y/n [Y]: Y
Download go version go1.8.3 to /Users/jbd/.go? Y/n [Y]: Y

Change-Id: I4fa72f2066259b75d3349487dae5bdced9fdd8a2
Reviewed-on: https://go-review.googlesource.com/51910
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-07-31 17:12:47 +00:00
Jaana Burcu Dogan
29518d98f4 cmd/getgo: display that -i stands for interactive mode
Change-Id: Ia6d8b0e9b2a355d2c4b41634fd51de51187be833
Reviewed-on: https://go-review.googlesource.com/51931
Reviewed-by: Kevin Burke <kev@inburke.com>
2017-07-31 17:04:26 +00:00
Chris Broadfoot
ac1e4b1998 cmd/getgo: initial commit
Initial commit of getgo, a "one-line installer".

Example use from bash:

  curl -LO https://get.golang.org/$(uname)/go_installer && chmod +x go_installer && ./go_installer && rm go_installer

It's comprised of two parts:

cmd/getgo/server: an App Engine application that redirects users to an
appropriate installer based on the request path, which identifies the
user's operating system. It's deployed to get.golang.org.

cmd/getgo: a cross-compiled binary that does the heavy lifting of
downloading and installing the latest Go version (including setting up
the environment) to the user's system. The installers are served from
the golang GCS bucket.

Currently supported systems:
  linux, darwin, windows / amd64, 386

Authored by Jess Frazelle, Steve Francia, Chris Broadfoot.

Change-Id: I615de86e198d3bd93e418fa23055d00ddbdd99fb
Reviewed-on: https://go-review.googlesource.com/51115
Reviewed-by: Jaana Burcu Dogan <jbd@google.com>
2017-07-28 18:26:31 +00:00
Matthew Dempsky
3da34b1b52 cmd/gorename: disable TestGeneratedFiles for !cgo builds
Fixes golang/go#21055.

Change-Id: I126cef4496c15424048e39b2af111c95580b90fb
Reviewed-on: https://go-review.googlesource.com/49390
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-17 21:59:59 +00:00
Tim Heckman
807424b52b cmd/go-contrib-init: exit with an error if package install fails
During the first run of `go-contrib-init` it tries to install the
golang.org/x/review/git-codereview package using `go get`. If this command were
to fail, we would check for the error and log that the command failed to
succeed. However, when failure occurred we would only log the error and not
interrupt the flow of the program. This would cause the program to continue with
the assumption that git-codereview had been installed correctly.

This change enhances the `go-contrib-init` command to exit with a bad status
code, after logging the failure, if installing git-codereview fails.

Fixes golang/go#21040

Change-Id: Ie01d78557d54285001db61faafbb409888b2893c
Reviewed-on: https://go-review.googlesource.com/49151
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-17 03:20:55 +00:00
Edward Muller
41b76ca51c present: Set the background using CSS
This allowed me to better match the background image to the size of
the slides.

Change-Id: Ieaae93cd78582a3059ed6c3e64e740dea9088af5
Reviewed-on: https://go-review.googlesource.com/47130
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-07-17 00:28:30 +00:00
Austin Clements
7a4327eb7a cmd/go-contrib-init: don't crash from src/golang.org/x
If go-contrib-init is executed from the src/golang.org/x directory (as
opposed to a sub-directory), it crashes with an index out-of-bounds.

Fix this by including the trailing slash in the inspected path prefix
so we never slice more than what we know is in the string.

Change-Id: Ibbb74759c2ba839972de34a8ffb28b6cfb6825e2
Reviewed-on: https://go-review.googlesource.com/48690
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-15 16:38:41 +00:00
Kevin Burke
6f1996fdfe cmd/go-contrib-init: better GOPATH checkout error message
Modify the error message to provide more context if the user is in the
wrong directory. (The default Terminal.app does not do a great job of
showing what directory you are currently in).

Change-Id: Iafcbbd2070ca968863120fb8c4bc15609475cda2
Reviewed-on: https://go-review.googlesource.com/48232
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-13 05:25:58 +00:00
Leo Rudberg
7a94893dc3 cmd/eg: Gofmt eg's dry-run output.
The content of the dry-run and the actual (file-editing) run should now
be the same.

Change-Id: If89f85838f7f53f14ffa4e2b6a425507835dda62
Reviewed-on: https://go-review.googlesource.com/48210
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-13 04:09:46 +00:00
Kevin Burke
76622760f0 cmd/go-contrib-init: match subdomain-less .gitcookies file
My `.gitcookies` file starts with ".googlesource.com", which
errored because it did not match "go.googlesource.com" or
"go-review.googlesource.com". Fix this by optionally matching on
"go.googlesource.com" or ".googlesource.com".

Fixes golang/go#20992.

Change-Id: I29d3c0b1e958382495a90502f280bdb52868c2c7
Reviewed-on: https://go-review.googlesource.com/48230
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-13 03:45:07 +00:00
Hiroshi Ioka
bce9606b3f cmd/bundle: include non-associated comments
https://golang.org/cl/45117 doesn't handle comments which don't
belong to any declarations. This CL addresses it.

Fixes golang/go#20627

Change-Id: I81c7cdc070efc6cb9e9f38101d7b2b8909916ba6
Reviewed-on: https://go-review.googlesource.com/45190
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-07-07 17:27:36 +00:00
suzmue
9dc2b714a0 cmd/gorename: add tests that run successfully
Set the env variable to only include the correct gopath in the test.

Fixes golang/go#20805

Change-Id: I496ed5c60278e508016f915cf53a115cc3c222ae
Reviewed-on: https://go-review.googlesource.com/47410
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-07-07 17:24:26 +00:00
Brad Fitzpatrick
6e57528ade imports: fix reading from stdin on Windows
Don't panic when reading from stdin on Windows. This is a regression
from https://golang.org/cl/43454

Also fix some weird behavior with stdin processing I noticed during
reviewing the code: don't allow the -w (write) flag, and adust the
filename shown with the -d (diff) flag.

Fixes golang/go#20941

Change-Id: I73d0a1dc74c919238a3bb72823585bbf1b7daba1
Reviewed-on: https://go-review.googlesource.com/47810
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Jones <rbjones@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-07-07 17:20:05 +00:00
Alan Donovan
da9759ca30 cmd/bundle: fix nil dereference panic
In the loader API, (*Config).Import, like go/build, accepts relative
paths such as ".", but (*Program).Package requires the exact path of a
loaded package.  So, to find the package identified by "." we must
look at the set of packages actually loaded, which in this scenario is
guaranteed to be a singleton.

(This is a definite weakness of the loader API.  In the more general
case where two or more packages are imported, it's tricky to correlate
the calls to Import with the package(s) each call actually loads.)

Fixes golang/go#20751

Change-Id: I925e969c9b4f4d6b6344c16f156b47857436d70a
Reviewed-on: https://go-review.googlesource.com/46414
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2017-06-23 02:24:18 +00:00
Suzy Mueller
1ab5277e83 refactor/rename: fail cleanly when attempting to rename cgo files
Previous implementation will overwrite files the import "C" with the
cgo preprocessing and renaming. Rename will now emit an error when
rename must edit files that import "C". Will also emit more useful
error when using -offset in a "C" importing file.

Fixes golang/go#17839

Change-Id: I072100b22197ec145b56d727feca58be7529e359
Reviewed-on: https://go-review.googlesource.com/45930
Reviewed-by: Alan Donovan <adonovan@google.com>
2017-06-23 01:23:57 +00:00
Yasuhiro Matsumoto
545ce0dcdd tools: handle paths like ~/ or $HOME/.
tilde should be located at the beginning of line.

Change-Id: I271ba5220da3c483838d1741d908755aee8e081e
Reviewed-on: https://go-review.googlesource.com/46430
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-22 02:08:34 +00:00
Koichi Shiraishi
cd6e398dae cmd/git-contrib-init: support http.cookiefile config for gitcookies
Change-Id: I097905122e1cb7298c31c330731f0fc3c6fc9b59
Reviewed-on: https://go-review.googlesource.com/46235
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-21 15:43:17 +00:00
Koichi Shiraishi
601a54bfa3 cmd/go-contrib-init: fix get GOPATH env logic
Go runtime now uses user homedir+go (i.e. $HOME/go) if GOPATH
environment variable is not set.

Change-Id: I26d90e07976a5311ea19de8a6e2c63830b802882
Reviewed-on: https://go-review.googlesource.com/46234
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-21 05:03:32 +00:00
Brad Fitzpatrick
f2cd9d3b51 cmd/go-contrib-init: fix in-GOPATH check
It's okay to have GOROOT=$HOME/go, GOPATH=$HOME.

That's what I have.

It's just not okay to hack in Go under $GOPATH/src.

Change-Id: I6ae69aceb43970bbdc9631ab090689a153954087
Reviewed-on: https://go-review.googlesource.com/45651
Reviewed-by: Steve Francia <spf@golang.org>
2017-06-14 16:55:02 +00:00
Chris Broadfoot
b4e0c5ecfb cmd/tip: manually scale talks to 1 instance
Disable health checker - it only causes trouble if we're running on one
instance. We'd rather see "starting up" than to have nothing served and
the instance killed when it doesn't come up ready in time.

Change-Id: I3396c626f840d606e0fb4a5ec4c0493195fd015f
Reviewed-on: https://go-review.googlesource.com/45654
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-13 23:21:29 +00:00
Chris Broadfoot
aca8b28035 cmd/tip: log error when fetching metadata
This error was previously ignored. This caused a silent failure when the
meta URL wasn't accessible.

Change-Id: I4020897ac15fec7b60a46277d81a99a6b6447a7d
Reviewed-on: https://go-review.googlesource.com/45655
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-13 23:21:17 +00:00
Brad Fitzpatrick
7d47e840ac cmd/goimports: update docs to not imply goimports is superset of gofmt
Change-Id: I098fa50c274d8206b6e2534d647cfae18d6b2703
Reviewed-on: https://go-review.googlesource.com/45390
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-06-13 20:38:26 +00:00
Kevin Burke
011098bb92 cmd/stress: flush out Usage doc
Provide more context when you run `stress -h` besides just the flags.

Change-Id: I9dbe7ba2b7178dd7a542d8c4c29bf79999a38234
Reviewed-on: https://go-review.googlesource.com/44810
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-12 21:12:06 +00:00
Hiroshi Ioka
e493388965 x/tools/cmd/bundle: include comments inside functions
Fixes golang/go#20548

Change-Id: Ieff2323b63308cbc052a2883237520620965cf86
Reviewed-on: https://go-review.googlesource.com/45117
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-06-09 02:56:03 +00:00
Steve Francia
2a3bccfb1b cmd/go-contrib-init: check working dir and autodectect repo
Change-Id: I730216e2954ff591a57314e82ffd7b43d1da8ed4
Reviewed-on: https://go-review.googlesource.com/45084
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-08 03:08:27 +00:00
Brad Fitzpatrick
a768197954 cmd/go-contrib-init: add git alias dry run mode, add success message
Updates golang/go#17802

Change-Id: I2b5473bc0539a760c26889497a301808deb5e5ae
Reviewed-on: https://go-review.googlesource.com/45083
Reviewed-by: Steve Francia <spf@golang.org>
2017-06-07 23:52:31 +00:00
Brad Fitzpatrick
16c483b02b cmd/go-contrib-init: don't assume user is in root directory of git checkout
Updates golang/go#17802

Change-Id: I8eeae42f395dee4eedd17114f10bb56536783089
Reviewed-on: https://go-review.googlesource.com/45082
Reviewed-by: Steve Francia <spf@golang.org>
2017-06-07 23:32:37 +00:00
Brad Fitzpatrick
154c88c09d cmd/go-contrib-init: add git-codereview bits
Updates golang/go#17802

Change-Id: Ic5278804203029926dd5a26e571f79aaafb13110
Reviewed-on: https://go-review.googlesource.com/45080
Reviewed-by: Steve Francia <spf@golang.org>
2017-06-07 23:21:04 +00:00
Brad Fitzpatrick
fe66dd2e3e cmd/go-contrib-init: add some git origin checks
Updates golang/go#17802

Change-Id: I70d30c5ff12837d51d13b5ca7e73be96eb535286
Reviewed-on: https://go-review.googlesource.com/45079
Reviewed-by: Steve Francia <spf@golang.org>
2017-06-07 22:49:11 +00:00
Brad Fitzpatrick
851770f01f cmd/go-contrib-init: add start of new tool to help new Go contributors
Updates golang/go#17802

Change-Id: Ieb4be41039d414a3ba6766d98ed95a6154f964f4
Reviewed-on: https://go-review.googlesource.com/45078
Reviewed-by: Steve Francia <spf@golang.org>
2017-06-07 22:20:13 +00:00
Keith Randall
1dbffd0798 cmd/toolstash: use "go env GOROOT" instead of runtime.GOROOT()
The GOROOT of whatever tool build toolstash is irrelevant. We want
the goroot of the "go" command we're testing.

Change-Id: Ie7e11c74cb445ea694d88c743dbc239a55d47864
Reviewed-on: https://go-review.googlesource.com/43033
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-05-09 20:09:15 +00:00
Keith Randall
a6971f4c11 cmd/compilebench: use go command in goroot, not environment
The "go" command is a random "go" in the environment, not
necessarily the one under test.  Use the go command in the
goroot we're testing.

This CL removes the need to add $GOROOT/bin to your path
before running compilebench.

Change-Id: Ieb7f441f8287105e13446006e73b760d80e51e03
Reviewed-on: https://go-review.googlesource.com/42932
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-05-09 19:43:46 +00:00
Takuto Ikuta
15b145e4e3 cmd/goimports: update doc.go for go-mode elisp
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>
2017-05-05 14:54:17 +00:00
Josh Bleecher Snyder
b6d1a163df Revert "cmd/compilebench: update example to use benchcmp instead of benchstat"
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>
2017-04-28 05:40:08 +00:00
Marvin Stenger
3aa1caa08a cmd/compilebench: update example to use benchcmp instead of benchstat
Change-Id: Id59ee04aba4d7c50e3b7c4e0b7e9aa75955640f5
Reviewed-on: https://go-review.googlesource.com/41861
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-27 00:37:34 +00:00
Damien Lespiau
9a6c6fca12 cmd/toolstash: fix package name in godoc hint
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>
2017-04-26 16:36:11 +00:00
Dmitri Shuralyov
1b22574ddb cmd/godoc: fix expected test output for Go 1.8 and older
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.

Fixes golang/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>
2017-04-26 05:21:38 +00:00
Josh Bleecher Snyder
518248cfad cmd/compilebench: add -pkg flag to compile a single package
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>
2017-04-25 22:47:38 +00:00
Josh Bleecher Snyder
7745887299 cmd/compilebench: add object file size to package benchmarks
Protected by flag -obj.

Sample relevant output from compilecmp using this commit.

name       old obj-bytes     new obj-bytes     delta
Template          382k ± 0%         381k ± 0%   -0.23%  (p=0.002 n=6+6)
Unicode           203k ± 0%         203k ± 0%   -0.00%  (p=0.002 n=6+6)
GoTypes          1.18M ± 0%        1.17M ± 0%   -0.08%  (p=0.002 n=6+6)
Compiler         3.99M ± 0%        3.99M ± 0%   -0.08%  (p=0.002 n=6+6)
SSA              8.28M ± 0%        8.28M ± 0%   -0.02%  (p=0.002 n=6+6)
Flate             230k ± 0%         230k ± 0%   -0.05%  (p=0.002 n=6+6)
GoParser          287k ± 0%         287k ± 0%   -0.16%  (p=0.002 n=6+6)
Reflect          1.00M ± 0%        1.00M ± 0%   -0.01%  (p=0.002 n=6+6)
Tar               190k ± 0%         189k ± 0%   -0.24%  (p=0.002 n=6+6)
XML               416k ± 0%         415k ± 0%   -0.16%  (p=0.002 n=6+6)

name       old export-bytes  new export-bytes  delta
Template         19.0k ± 0%        18.2k ± 0%   -4.55%  (p=0.002 n=6+6)
Unicode          4.45k ± 0%        4.44k ± 0%   -0.11%  (p=0.002 n=6+6)
GoTypes          29.7k ± 0%        28.8k ± 0%   -3.12%  (p=0.002 n=6+6)
Compiler         75.6k ± 0%        72.5k ± 0%   -4.03%  (p=0.002 n=6+6)
SSA              76.2k ± 0%        74.8k ± 0%   -1.72%  (p=0.002 n=6+6)
Flate            4.98k ± 0%        4.87k ± 0%   -2.29%  (p=0.002 n=6+6)
GoParser         8.81k ± 0%        8.34k ± 0%   -5.30%  (p=0.002 n=6+6)
Reflect          6.25k ± 0%        6.16k ± 0%   -1.49%  (p=0.002 n=6+6)
Tar              9.49k ± 0%        9.03k ± 0%   -4.82%  (p=0.002 n=6+6)
XML              16.0k ± 0%        15.4k ± 0%   -4.03%  (p=0.002 n=6+6)


Change-Id: I3f5e6ec022cb02ad6937f7859c573ca1edc39fb7
Reviewed-on: https://go-review.googlesource.com/41053
Reviewed-by: Robert Griesemer <gri@golang.org>
2017-04-25 00:26:14 +00:00