1
0
mirror of https://github.com/golang/go synced 2024-11-06 10:36:13 -07:00
Commit Graph

1859 Commits

Author SHA1 Message Date
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
Matthew Holt
9febd36660 tools/godoc: Fix indentation in doc contents
Mobile-friendly design overlooked indentation in table of contents
for article table of contents; this change restores indentation.

Change-Id: I9a3013497e1659ebfb657a8fb9374b8ad9b04b16
Reviewed-on: https://go-review.googlesource.com/11582
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-06-28 23:35:27 +00:00
Alan Donovan
a87e08b564 godoc/static/analysis: update user documentation
Change-Id: I765b246b44210612a8d7d0484beab07a86fa79c5
Reviewed-on: https://go-review.googlesource.com/9243
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-26 20:38:07 +00:00
Alan Donovan
a9866431ad refactor/importgraph: don't ignore imports in packages with errors.
And in gomvpkg, don't stop just because some packages had errors.
This is inevitable in a large GOPATH tree.

Fixes issue golang/go#10907

Change-Id: I9a60b070228d06d44880202eeef54394e914f5d5
Reviewed-on: https://go-review.googlesource.com/10715
Reviewed-by: Sameer Ajmani <sameer@golang.org>
2015-06-26 20:29:59 +00:00
Matthew Holt
f671283c22 tools/godoc: Mobile-friendly site design
This change makes golang.org responsive, including a top
bar menu and appropriate font sizing. The result is a
website that looks pleasing and is functional both on
mobile and on desktop. Also added a few print styles so
the site looks great on paper or PDF.

Change-Id: I16ee25ef4afde2002f240aec0804414bfb172a24
Reviewed-on: https://go-review.googlesource.com/9062
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2015-06-24 07:57:00 +00:00
Robert Griesemer
e841ad2e00 go/types: fix minor typo in comment
Change-Id: I2d696655c409f94a5ab6a3837b4b83bc7eb0b15d
Reviewed-on: https://go-review.googlesource.com/11366
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-23 21:03:00 +00:00
Robert Griesemer
8c8cd541fa go/types: in string(x) conversions, x must be of integer type
Fixes golang/go#11357.

Change-Id: Id6994a0fe3830cf56d3dbdd60a4dff89404e5a41
Reviewed-on: https://go-review.googlesource.com/11365
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-23 20:21:05 +00:00
Robert Griesemer
6369699504 go/types: better error message for certain unaary/binary expression errors
Fixes golang/go#11367.

Change-Id: Ic7f1bad51165685097c909fd18c245a57924cdc8
Reviewed-on: https://go-review.googlesource.com/11363
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-23 19:43:07 +00:00
Robert Griesemer
e9a746de6e go/types: add missing test for constant shifts
Fixes golang/go#11325.

Change-Id: Ic302098fffd337fcfa31274319cdbd78907a6d5d
Reviewed-on: https://go-review.googlesource.com/11344
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-22 22:52:46 +00:00
Robert Griesemer
af817890aa go/gccgoimporter: fix tests for Plan9
This is a backport of https://go-review.googlesource.com/#/c/11194/.

Change-Id: I2f8a8efec77a29258c85f5a1b11cd9deb81853d0
Reviewed-on: https://go-review.googlesource.com/11210
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-06-18 00:30:47 +00:00
Robert Griesemer
605d5bf7f5 go/gcimporter, go/types: skip nacl-arm for some tests
Backport of https://go-review.googlesource.com/9674 .

Change-Id: Ie86bea98e910616b2d6a49387b1aed973d4f1c66
Reviewed-on: https://go-review.googlesource.com/11126
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-15 20:50:49 +00:00
Robert Griesemer
f9379e5b1f go/types: be robust in the presence of incorrect/missing position info
Fixes go/loader test crash.

TBR: adonovan

Change-Id: I91dba5e001afa0ee188ccea4db904a6ce744c4d0
Reviewed-on: https://go-review.googlesource.com/11042
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-13 01:27:06 +00:00
Robert Griesemer
e5c3ebe4c7 go/pointer: fix build (provide correct args to types.NewSignature and types.Eval)
TBR: adonovan

Change-Id: I4b43b566278ede6b780a59f986c0fc392a5ef4ac
Reviewed-on: https://go-review.googlesource.com/11041
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-13 01:08:28 +00:00
Robert Griesemer
f389b29208 go/ssa: fix build (remove unused params to types.NewSignature)
TBR: adonovan

Change-Id: I669140d6e0735804625b0327caa51f4e1807d277
Reviewed-on: https://go-review.googlesource.com/11040
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-13 00:57:15 +00:00
Robert Griesemer
136b4e419b go/types: revert most recent change - we cannot rely on 1.5 features quite yet
Revert "go/types: fix Eval to use correct file set when evaluating an expression"

This reverts commit d241a1448b.

Change-Id: Ie16c57da2732d8b079108efef100fc956b71f737
Reviewed-on: https://go-review.googlesource.com/11010
Reviewed-by: David Symonds <dsymonds@golang.org>
2015-06-13 00:06:15 +00:00
Robert Griesemer
d241a1448b go/types: fix Eval to use correct file set when evaluating an expression
Change-Id: I221bd26cc90755de57c8f1941cabddd14d56584d
Reviewed-on: https://go-review.googlesource.com/10999
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-12 23:51:01 +00:00
Josh Bleecher Snyder
85ad76014a cmd/vet: fix build
Broken by CLs 10994 and 10800.

Fixes golang/go#11194.

Change-Id: Ic071fae6bf7e8ac9518d84c74c98d1d7233c2025
Reviewed-on: https://go-review.googlesource.com/11004
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-12 23:48:11 +00:00
Robert Griesemer
b5429ae521 go/types: fix comment (missed in last commit)
Change-Id: I4ea2a6b89b44b11cbcf771d0aab3e30370f59d31
Reviewed-on: https://go-review.googlesource.com/10996
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-12 23:17:17 +00:00
Robert Griesemer
ee0cf325b1 go/types: provide full source file extent to file scope
Change-Id: Ib3472ab9e6b5bae0b03474ea57857fde1afbd43a
Reviewed-on: https://go-review.googlesource.com/10995
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-12 23:15:45 +00:00
Robert Griesemer
44761a8f84 go/types: remove unused scope parameter from NewSignature
Change-Id: I93c4185d7eeafde43b6b512b6e574d3332401c09
Reviewed-on: https://go-review.googlesource.com/10994
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-12 23:15:00 +00:00
Robert Griesemer
3c2fc37aec go/gccgoimporter: remove incorrect scope passed to NewSignature
Change-Id: I4b9670dc72ef85b852361aa5524a55b82d88e8f2
Reviewed-on: https://go-review.googlesource.com/10993
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-12 23:06:12 +00:00
Robert Griesemer
568df9f49c go/types: remove global vars in test
Change-Id: I5fb61a38362a40c706ba5cb8968c387c8dc4aef2
Reviewed-on: https://go-review.googlesource.com/10992
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-12 23:05:41 +00:00
Robert Griesemer
665374f1c8 go/types: add pos parameter to Eval; remove New, EvalNode
Scopes now have "extent" information; that is they provide a
range [scope.Pos(), scope.End()) which describes the source
text range covered by the scope. It requires that the incoming
AST has correct position information; also the extent for the
Universe and for package scopes is not set (positions are invalid).

Objects have a new (currently unexported) scopePos position,
which is the position at which the object becomes visible inside
its *Scope.

Scope.LookupParent takes an addition parameter pos. If valid, an
identifier is looked up as if found at position pos. This can be
used to find the object corresponding to an identifier at position
pos after scopes have been completely populated (and thus may
contain the same identifier which may be defined only later in the
source text).

Fixes #9980.

Change-Id: Icb49c44c5c3d4b93c0718ce2a769ec468877709d
Reviewed-on: https://go-review.googlesource.com/10800
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-12 23:04:54 +00:00
Robert Griesemer
a6d2a4254e cmd/vet: backport of https://go-review.googlesource.com/#/c/10777/3
Change-Id: I8d63575f2053eda2d7f0a63f3ff862bf0de88d31
Reviewed-on: https://go-review.googlesource.com/10807
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-09 16:33:12 +00:00
Alan Donovan
ac303766f5 go/ssa/interp: don't run encoding/pem tests in interpreter
since they use quick.Check, which requires the unimplemented
(reflect.Value).SetString.

Also:
- Add reflect.Type.{In,NumIn} methods, whose absence
  was only the proximate cause of the failed test.
- Delete bodies of reflect.Value methods so that it's obvious a
  function that should be intrinsic is missing.

Change-Id: Ib64b8f4953a913f4ead90e376bda70419adb87cb
Reviewed-on: https://go-review.googlesource.com/10796
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-06-06 15:50:50 +00:00
Robert Griesemer
f0b0213b21 cmd/vet: remove dependency on types.New
In preparation for removal of types.New.

Change-Id: Ieff0c41cf03351124cea32e9b96075a4801c051f
Reviewed-on: https://go-review.googlesource.com/10775
Reviewed-by: Rob Pike <r@golang.org>
2015-06-05 20:06:37 +00:00
Robert Griesemer
de24c4870a go/types: remove unused return value (minor cleanup)
Change-Id: I37dd83100b7e977e1d5a06ae84a93a40bbd651c3
Reviewed-on: https://go-review.googlesource.com/10773
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-05 18:41:51 +00:00
Robert Griesemer
e262ee18f0 go/types/typeutil: add missing copyright notices
Change-Id: I101c033ffc20fde38b0f0b075f559aa10a6e43d0
Reviewed-on: https://go-review.googlesource.com/10772
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-06-05 18:11:17 +00:00