1
0
mirror of https://github.com/golang/go synced 2024-10-01 05:18:33 -06:00
Commit Graph

1736 Commits

Author SHA1 Message Date
Nathan Youngman
6c9aff3429 website: fix JavaScript error on website and blog in non-ES6 browsers
In Safari a JavaScript error in personalizeInstallInstructions prevents
the featured articles from displaying. startsWith is an ES6-only feature.

Fixes golang/go#12283

Change-Id: I9f471362cdac0243758e482ed3a21b0d6aa48c8b
Reviewed-on: https://go-review.googlesource.com/13841
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-24 08:00:06 +00:00
Russ Cox
93604a3dc2 go/loader: fix fd leak and limit calls to ioutil.ReadDir
This makes 'ulimit -n 128; go test -short -v' pass.
It did not before, and that was breaking the openbsd/386 builder.

For golang/go#11811.

Change-Id: Idfdb2f4007ed06c6084486c0e58a561add552d2c
Reviewed-on: https://go-review.googlesource.com/13695
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-08-18 23:39:26 +00:00
Andrew Gerrand
9f2124fb70 cmd/tipgodoc: change capitalization of 'Authors' to be consistent
Change-Id: I040007a2b9bfa3388f3fbed839b2e5c6853925b3
Reviewed-on: https://go-review.googlesource.com/13596
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-08-16 08:15:44 +00:00
David R. Jenni
4f50f44d7a imports: fix bug, where unused named import is mistaken for unnamed import.
Fixes #8149.

Change-Id: Ia3d318f70981b2032a71d3fd32eaffba20cfbcbd
Reviewed-on: https://go-review.googlesource.com/13371
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-08-12 17:18:37 +00:00
Andrew Gerrand
b8e61d42ca cmd/godoc: remove obsolete vet redirect
The vet command has been moved back to the core repo.

Fixes golang/go#12088

Change-Id: I26e5ed6a8c7915af1cf96db4c3a16a2e812ab394
Reviewed-on: https://go-review.googlesource.com/13460
Reviewed-by: Rob Pike <r@golang.org>
2015-08-10 01:42:01 +00:00
Robert Griesemer
d02228d185 cmd/callgraph: exclude test for Android
For golang/go#11811.

Change-Id: I4cec398a0a6d43f3297c205f73193522928a5b31
Reviewed-on: https://go-review.googlesource.com/13280
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-08-06 01:46:44 +00:00
Robert Griesemer
958ab4f550 x/tools: disable tests not supported on Android
For golang/go#11811.

Change-Id: Icf16a2d47fcf2fe0d79dd825ccb851a3d63a660f
Reviewed-on: https://go-review.googlesource.com/13268
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-08-06 00:36:03 +00:00
Robert Griesemer
63f996ec75 cmd/stringer: exclude end-to-end test for Android
Change-Id: I37224abb3d9ca902ed23d520493f3b2794ef0471
Reviewed-on: https://go-review.googlesource.com/13261
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-05 22:44:14 +00:00
Robert Griesemer
874e71548b go/ssa/interp: exclude another long-running test if -short is set
For #11811.

Change-Id: Ic3bf3c035ce402f144b5b6670d5ef062874b167e
Reviewed-on: https://go-review.googlesource.com/13260
Reviewed-by: Chris Manghane <cmang@golang.org>
2015-08-05 21:28:02 +00:00
Andrew Gerrand
7e0ad01d16 godoc/static: tweak regular expression to match source builds
(This time for sure!)

Change-Id: Ic9b7dbfb527af9aa029365f7a91bd3b949985431
Reviewed-on: https://go-review.googlesource.com/13220
Reviewed-by: Chris Broadfoot <cbro@google.com>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-05 07:07:08 +00:00
Andrew Gerrand
18635ec5c3 godoc/static: tweak regular expression to match old darwin builds
Change-Id: I74020ece0cf8b4aceb60d75475500569d08416ee
Reviewed-on: https://go-review.googlesource.com/13211
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-08-05 06:32:32 +00:00
Andrew Gerrand
a29e96e3bf godoc/static: redirect to download from installation instructions page
Change-Id: If29d04ced7404d6ba8761f734b4a16fe96959635
Reviewed-on: https://go-review.googlesource.com/13200
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-08-05 05:57:28 +00:00
Andrew Gerrand
46829bf9ce godoc/static: dynamically adjust install instructions for a given download
This change allows the download page to redirect the user to
/doc/install?download=filename so the user can see installation
instructions specific to the file they are downloading.

This is related to this change to the core repo:
https://golang.org/cl/13151

Change-Id: Ia81344ed913aea1d1a4deed021c0e07f7360ff68
Reviewed-on: https://go-review.googlesource.com/13180
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-08-05 04:18:54 +00:00
Andrew Gerrand
bbc4202318 godoc/static: shorten vertical space above headings
Without this change, a h3 below a h2 looks weird.

Change-Id: I96cd1545615547b03460cf6896acd0df1abfc1a1
Reviewed-on: https://go-review.googlesource.com/13052
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-08-03 23:58:58 +00:00
Robert Griesemer
5a6a7b4d40 x/tools/cmd/stress: don't build for Plan 9 (syscall.SIGABRT not defined)
See golang/go#11975.
For golang/go#11811.

Change-Id: I56ee20cd798bf963afdf3c81c4745f07850f6dcc
Reviewed-on: https://go-review.googlesource.com/13034
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-31 22:56:17 +00:00
Robert Griesemer
32dcbb4ccc cmd/godoc: exclude TestTypeAnalysis on Plan 9 for now
Attempt to make build work on Plan 9.

For golang/go#11811.

Change-Id: I37a5eaef441262342994a8f77c86aa5e120deea7
Reviewed-on: https://go-review.googlesource.com/13033
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-31 22:39:36 +00:00
Robert Griesemer
50fdc6b946 go/loader: exclude example tests from Windows tests
The output of ExampleConfig_CreateFromFiles and ExampleConfig_Import
are different for Windows that for other platforms: They contain
internal/syscall/windows packages and unicode/utf16 not present in
the output for other platforms.

For golang/go#11811.

Change-Id: Id391fbeec8123616da86cb68fc3cefcd513b2493
Reviewed-on: https://go-review.googlesource.com/13032
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-31 22:13:26 +00:00
Robert Griesemer
784fe34e06 go/ssa/interp: abort long-running test when testing.Short() is set
This should help on slower machines.

For golang/go#11811.

Change-Id: Ibb5d5bf0f6cedcda6437ef0ee3fc1f4ba89dab90
Reviewed-on: https://go-review.googlesource.com/13009
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-31 22:12:02 +00:00
Alex Brainman
d89a972634 go/loader: remove blank line
Blank line was inserted by mistake in CL 12830.

Change-Id: I9e4b3562a4efcab43c5a85c2960a0d22c0aab752
Reviewed-on: https://go-review.googlesource.com/12883
Reviewed-by: Dmitri Shuralyov <shurcool@gmail.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-07-31 21:22:20 +00:00
Robert Griesemer
fe546a3233 go/types: exclude some tests when running against Go 1.4
For golang/go#11811.

Change-Id: I130f9608840177cfb7fb9fae30765fcb5aa77411
Reviewed-on: https://go-review.googlesource.com/13008
Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-31 20:09:52 +00:00
Alan Donovan
680b4cd5a8 cmd/fiximports: added package-level documentation
Change-Id: I612229e5d9e80a25cd77296c0abb6bdcf62bcf8a
Reviewed-on: https://go-review.googlesource.com/12924
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-31 13:54:42 +00:00
Andrew Gerrand
d1eaf38956 cmd/godoc: don't run indexer test in -short mode
It takes too long for the builders.
Also remove GOPATH from the environment when indexing.

Change-Id: I9a3f2628f248bdbf9dce97119c2fbb7cbd63f3fe
Reviewed-on: https://go-review.googlesource.com/12917
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-31 05:12:20 +00:00
David R. Jenni
20d85c34f3 refactor/mvpkg: rewrite external test packages.
Rename the package name of the external test package, e.g. <from>_test to <to>_test.
Rewrite the import statements of external test packages which import the renamed package.

Fixes #10507

Change-Id: Iad702189469c54776e55ed4a821610bd9977618c
Reviewed-on: https://go-review.googlesource.com/12637
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-07-30 21:17:38 +00:00
Alan Donovan
14b8253455 go/loader: fork example_test.go for go1.4 since the expectations differ
Change-Id: I91138351525ce49b9afccdc66c59e7a4c1c0e096
Reviewed-on: https://go-review.googlesource.com/12870
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-07-30 00:13:23 +00:00
Alex Brainman
f25d0131d4 go/loader: make TestLoad_ParseError_AllowErrors pass on windows
Update golang/go#11811

Change-Id: Ic5f1ea87c88d563b6e0ef2d44042e28a9ea03a03
Reviewed-on: https://go-review.googlesource.com/12830
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-07-30 00:12:49 +00:00
Alan Donovan
739a26ae62 go/loader: add paranoid assertions to help diagnose issue 11012
Change-Id: I5e24fe0fb605bdb39de11309e0e3c8ffd7a1eb8b
Reviewed-on: https://go-review.googlesource.com/12842
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-07-29 18:39:32 +00:00
Alex Brainman
166a1118e9 go/loader: update examples Output
Some standard library dependencies have changed (packages and files).
Both ExampleConfig_CreateFromFiles and ExampleConfig_Import Output
needs to be adjusted. Do that.

Update golang/go#11811

Change-Id: I523f2adc1aa46f0932a71ccb23dd7c5a6b07fb27
Reviewed-on: https://go-review.googlesource.com/12832
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-07-29 16:23:00 +00:00
Jeff R. Allen
06e42bd9eb tools/godoc: list all sub-repos
The list of sub-repos at the bottom of the /pkg
page is unfortunately hand-maintained. With this
commit, it is now up-to-date and ready to get out
of date again.

Fixes golang/go#9081.

Change-Id: I3dc5e11ed65f53ea7299a259575ebcb6ad6b13ec
Reviewed-on: https://go-review.googlesource.com/12512
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-29 07:17:33 +00:00
Alex Brainman
0cac9d87b7 cmd/fiximports: make tests pass on windows
Update golang/go#11811

Change-Id: I1f8977cf8eed84936c7c2b568f87abe88f5723f9
Reviewed-on: https://go-review.googlesource.com/12788
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-29 07:14:17 +00:00
Alex Brainman
7ba2a8c9a9 cmd/vet: make TestTags pass on windows
Update golang/go#11811

Change-Id: I3d875acf58a015fa4cae16473a118ac8196b9b44
Reviewed-on: https://go-review.googlesource.com/12789
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-29 05:48:44 +00:00
Andrew Gerrand
0f0e72bcc3 godoc/static: fix handling of playground snippets with no output
Fixes golang/go#11903

Change-Id: Ia7f85d83f1f697fd787a87cd74971f6cf0540792
Reviewed-on: https://go-review.googlesource.com/12751
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-28 06:47:23 +00:00
Michal Cierniak
7fe0389f47 go/ssa: update package doc to mention ssautil.CreateProgram
Change-Id: I92fb6cf5683c335826d2e84394cc594639e34fe6
Reviewed-on: https://go-review.googlesource.com/12542
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-07-27 18:48:45 +00:00
Austin Clements
69f53eb622 cmd/stress: add "-ignore regexp" flag
This adds a flag for specifying a regular expression for failures that
should be ignored. This is useful for filtering out known issues and
provides a logical mirror to the existing -failure flag.

Change-Id: Ibbacdd2125aa23fe819896e5a17664b703c4ee35
Reviewed-on: https://go-review.googlesource.com/12676
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
2015-07-26 16:09:35 +00:00
Michael Stapelberg
4d49207e6b fix typo: s/connnection/connection/
Change-Id: Ib59dd669cf44b10f5ba811b4916721e6aea611d7
Reviewed-on: https://go-review.googlesource.com/12630
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-24 17:26:06 +00:00
Robert Griesemer
1c460ffc92 go/types: run tests that were excluded by mistake
Backport of https://go-review.googlesource.com/#/c/12517/.

TBR=adonovan

Change-Id: I6b010c977c9a770a27c3fa1271c07c38d9b84185
Reviewed-on: https://go-review.googlesource.com/12601
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-07-23 22:55:45 +00:00
Josh Bleecher Snyder
ec600479b2 godoc/redirect: make /issue and /issues identical
I frequently type one when the other is required.
Make them interchangeable.

Change-Id: Ib98d2b67aa42d79e6a8e9fd29fdea17048378eb6
Reviewed-on: https://go-review.googlesource.com/12509
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-22 23:30:17 +00:00
Robert Griesemer
88421f4cb2 go/types: unexport UniverseByte/Rune; make Typ a slice
Also: backport https://go-review.googlesource.com/#/c/12443/ .

Change-Id: Ia8a664c627a70a17701b2d48946704c15f4f49c0
Reviewed-on: https://go-review.googlesource.com/12482
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-21 18:42:36 +00:00
Robert Griesemer
436a79e5dd go/types: fix internal inInteger operand predicate
Backport of https://go-review.googlesource.com/#/c/12045/

Fixes golang/go#11594.

Change-Id: I3c81e2b1bbdc084d4a323fd963c1c780054ce223
Reviewed-on: https://go-review.googlesource.com/12046
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-07-21 17:32:59 +00:00
Sameer Ajmani
87156cb766 tools/godoc: remove server's dependence on "expvar".
Importing "expvar" exports server variables on /debug/vars by default.  This
raises security concerns in some environments.  Users should opt-in to this
instead.  If users need godoc metrics, we can provide a function in the godoc
package to read them.

Change-Id: Ie12e695d5958b646e82e7e00de651cc1913aa98d
Reviewed-on: https://go-review.googlesource.com/12270
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-16 20:19:27 +00:00
Alan Donovan
c5ca59aab8 go/loader: issue informative error (not panic) if cgo used in ad hoc package
See https://github.com/golang/go/issues/11627.

Change-Id: I458bc4ea54d0db34f3ba96060d284eda4bad7111
Reviewed-on: https://go-review.googlesource.com/12190
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-07-14 18:01:18 +00:00
Jeff Hodges
ea5101579e tools/refactor/rename: add provide to rename.el
Fixes #11110

Change-Id: I29eaff7f730f7680afaa9ad058ac797bdab98a18
Reviewed-on: https://go-review.googlesource.com/11947
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-07-13 22:45:56 +00:00
David Crawshaw
5c915edf62 cmd/godoc: redirect /x to subrepo page
Fixes golang/go#9061.

Change-Id: Ibe5764932bb8e223e7f838415f84bc330eb5d818
Reviewed-on: https://go-review.googlesource.com/12082
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-13 18:17:26 +00:00
Alan Donovan
543085f0ec go/callgraph: add "concurrent" or "deferred" prefix to (*Edge).Description
Fixes golang/go#11518

Change-Id: If6c86c1995c0b6a1226deedaa1713947baa6593a
Reviewed-on: https://go-review.googlesource.com/12085
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
2015-07-13 18:17:08 +00:00
Robert Griesemer
4cd43f3077 go/types: exclude tests that run too long
Backport of the go/types-specific changes of:

https://go-review.googlesource.com/#/c/11673/

(from std repo go/types). This will allow running
the go/types tests again in the x/tools repo.

Change-Id: I97d4664d5aed6309e74b571f86f36f8bb4df4fca
Reviewed-on: https://go-review.googlesource.com/12042
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-10 21:57:21 +00:00
INADA Naoki
e81d36e137 refactor/rename: fix command name in comment
Change-Id: I7a74c07b104cf1d1adb4536522ff2341d24ebd82
Reviewed-on: https://go-review.googlesource.com/12010
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-07-10 11:08:02 +00:00
Andrew Gerrand
e645bbf898 playground/socket: make output/end race less likely
This doesn't fix the race; doing that would require a bit of a redesign.
Since GopherCon is this week, just put in this stop-gap measure for now.

Update golang/go#11534

Change-Id: Ied6c5dd52778534a7a08b5ba3fa15c0352a65646
Reviewed-on: https://go-review.googlesource.com/11886
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-07-05 21:12:29 +00:00
Alan Donovan
997b3545fd go/types: change {Type,Object,Selection}String to accept a Qualifier function
The optional Qualifier function determines what prefix to attach to
package-level names, enabling clients to qualify packages in different
ways, for example, using only the package name instead of its complete
path, or using the locally appropriate name for package given a set of
(possibly renaming) imports.

Prior to this change, clients wanting this behavior had to copy
hundreds of lines of complex printing logic.

Fun fact: (*types.Package).Path and (*types.Package).Name are valid
Qualifier functions.

We provide the RelativeTo helper function to create Qualifiers so that
the old behavior remains a one-liner.

Fixes golang/go#11133

Change-Id: Ibd63f639c7b3aa1738826d6165f2d810efeb8293
Reviewed-on: https://go-review.googlesource.com/11692
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-30 19:00:00 +00:00
Alan Donovan
749901c676 go/types: add an API test of the Scope type
Also: make (*Scope).Innermost work for Package scopes.

Change-Id: I9836676e94f95df897101606bed6f29ba46e0f9d
Reviewed-on: https://go-review.googlesource.com/11691
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-29 20:05:11 +00:00
Alan Donovan
27bc91e0ba go/ssa/interp: disable interpretation of packages that have sprouted Examples
since we can't interpret os.Pipe yet.

Change-Id: If27dadc18532274ce97ad7e7557e8614dd15279e
Reviewed-on: https://go-review.googlesource.com/11712
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-29 19:24:15 +00:00
Andrew Gerrand
7e09e07243 cmd/present: fix mixed content warnings when served by HTTPS
Fixes golang/go#11392

Change-Id: Ic7ecf19d88c5a7f1d0ef9bd21476074b242854f0
Reviewed-on: https://go-review.googlesource.com/11534
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-06-29 01:10:50 +00:00