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

857 Commits

Author SHA1 Message Date
Shenghou Ma
35875c1a92 go.tools/cmd/godoc/static: fix text template for variable examples.
Fixes golang/go#7771.

LGTM=bgarcia
R=golang-codereviews, bradfitz, bgarcia
CC=golang-codereviews
https://golang.org/cl/87180044
2014-04-22 18:46:26 -04:00
Robert Griesemer
4bc2f4e34b go.tools/go/types: fix doc comment
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/90100043
2014-04-21 16:35:40 -07:00
Alan Donovan
8eccac8f9a go.tools/refactor/eg: avoid nonstandard 'diff -N' option.
(To fix broken Solaris test)

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/90080044
2014-04-21 18:35:16 -04:00
Alan Donovan
f1247de572 go.tools/cmd/doc: make filename logic separator-agnostic
(Speculative fix for broken cmd/godoc test on Windows.)

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/90090043
2014-04-21 18:34:22 -04:00
Alan Donovan
4a9f74ad65 cmd/godoc: wait up to 500ms for results of -analysis=type.
(The test thread is racing with the analysis thread, which
takes around 4ms on this input.)

LGTM=gri
R=gri, bradfitz
CC=golang-codereviews
https://golang.org/cl/89780044
2014-04-21 17:56:06 -04:00
Peter Collingbourne
feafa74756 go.tools/go/types: address and slice operations are not addressable
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/89380044
2014-04-21 11:38:43 -07:00
Peter Collingbourne
998b73a2e9 go.tools/go/types: result of make and new builtins are not addressable
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/89390045
2014-04-21 11:20:54 -07:00
Alan Donovan
379e0e7704 go.tools/go/types: x,y:=0,0 is a Use (not Def) of x if it is already defined.
+ test.

Fixes golang/go#7827

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/89600045
2014-04-21 14:05:25 -04:00
Alan Donovan
1ae1c63748 go.tools/go/ssa/interp: add wrappers for Sysctl{,Uint32} intrinsics on FreeBSD
(Speculative fix---I can't test it directly.)

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/89320043
2014-04-18 15:58:12 -04:00
Robert Griesemer
de6fbfe0ea go.tools/cmd/godex: make relative package paths work
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/89160044
2014-04-18 12:44:23 -04:00
Andrew Wilkins
f8200537d8 go.tools/go/gccgoimporter: use gccgo -dumpversion
GccgoInstallation.InitFromDriver currently parses
the output of gccgo -### to get the gcc version,
target triple, and library paths. At least with
Ubuntu's stock libgo5 package, the search path for
.gox files derived from the version is incorrect.

gccgo uses the DEFAULT_TARGET_VERSION macro when
constructing the search path; this value can be
retrieved from gccgo via the "-dumpversion" flag.

Fixes golang/go#7772.

LGTM=iant, gri
R=golang-codereviews, iant, gri
CC=golang-codereviews
https://golang.org/cl/88150043
2014-04-17 13:40:42 -07:00
Alan Donovan
4843aaee02 godoc: add very basic integration test of godoc -analysis=type.
Also: fix careless regression introduced yesterday.

LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/88880043
2014-04-17 15:51:27 -04:00
Robert Griesemer
a7ddb1e509 godex: improved printing of numeric constants
TODO: Add testing code (another CL).

LGTM=adonovan
R=golang-codereviews, adonovan
CC=golang-codereviews
https://golang.org/cl/88090044
2014-04-17 11:28:24 -07:00
Alan Donovan
066bab1496 go.tools/refactor/eg: move misplaced comment
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/88100046
2014-04-16 16:50:19 -04:00
Alan Donovan
503140c72e godoc: documentation of -analysis features.
The text and images are "baked in" to the godoc executable's
rodata section (~300KB) and are accessible from the godoc
server itself at /lib/godoc/analysis/help.html.

In due course, the page will become visible at
http://golang.org/lib/godoc/analysis/help.html, which will be
the canonical location for this doc (in announcements, etc).

The page is temporarily visible here, for those on the Google corp network:
http://172.26.104.127:7777/lib/godoc/analysis/help.html

Also:
- add link to new doc from source view pages.
- document -analysis flag in cmd/godoc/doc.go
- fix indentation of -analysis flag's help string

LGTM=gri
R=gri, bgarcia, r
CC=golang-codereviews
https://golang.org/cl/87110045
2014-04-16 16:35:08 -04:00
Robert Griesemer
1961019b8c go.tools/go/exact: tweaked documentation
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/88630043
2014-04-16 13:07:59 -07:00
Alan Donovan
83a7488b3d go.tools/godoc: remove nil deference panic on loading error
Also:
- remove stale comment about line numbers.
- log a warning if file's package root not found.

LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/88510044
2014-04-16 15:01:23 -04:00
Alan Donovan
9531aca448 go.tools/go/pointer: add TODO comment.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/87810046
2014-04-15 15:41:02 -04:00
Alan Donovan
6ec40d9aac go.tools/oracle: don't discard /usr/bin/diff's stderr
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/87980045
2014-04-15 15:39:38 -04:00
Alan Donovan
5421af34cc go.tools/go/types: fix typo in comment.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/88200044
2014-04-15 15:39:24 -04:00
Alan Donovan
b3970ee159 go.tools/go/oracle: show import path (not just name) when describing an import.
+ test.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/88190044
2014-04-15 15:37:44 -04:00
Alan Donovan
bc722df585 go.tools/go/ssa/interp: minor cleanup
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/88080044
2014-04-15 15:37:32 -04:00
Josh Bleecher Snyder
6157b5a256 go.tools/cmd/benchcmp: expand documentation
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/85390044
2014-04-14 17:00:04 -07:00
Alan Donovan
647d17e45f go.tools/go/ssa/interp: add no-op intrinsic sync.runtime_registerPoolCleanup
Also, compute correct index of struct field sync.Pool.New, which just changed.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/87780043
2014-04-14 17:53:58 -04:00
Robert Griesemer
b5d07c813b go.tools/go/types: tweak test exceptions
Per feedback from rsc.

LGTM=rsc, adonovan
R=adonovan, rsc
CC=golang-codereviews
https://golang.org/cl/86310043
2014-04-10 10:39:00 -07:00
Alan Donovan
ccb0e9ab88 go.tools/.hgignore: don't ignore test-generated files, clean them up.
(Includes rollback of CL 83680043.)

LGTM=gri
R=gri
CC=golang-codereviews, rsc
https://golang.org/cl/86430045
2014-04-10 13:17:20 -04:00
Josh Bleecher Snyder
3bca0c7d87 imports: use chan struct{} for disk semaphore
Update golang/go#7747

LGTM=bradfitz
R=bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/86280043
2014-04-09 17:40:05 -07:00
Robert Griesemer
8caaaf224f go.tools/go/types: exclude broken test case (fix build)
TBR=adonovan

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/86260043
2014-04-09 15:32:36 -07:00
Alan Donovan
7ef831a4e6 go.tools/go/ssa: perform nil check when taking value of interface method.
+ test.

Fixes golang/go#7269

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/84650046
2014-04-09 18:00:57 -04:00
Alan Donovan
b12fe1707c go.tools/go/loader: slashify the name of packages found by walking the file tree.
Otherwise on Windows the enumerated package "net\\http" will
be distinct from the imported package "net/http" leading to
strange errors.  (A similar bug was fixed in go/ssa/stdlib_test.go.)

Fixes golang/go#7189

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/86170043
2014-04-09 15:47:42 -04:00
Alan Donovan
7f24a8300e go.tools/godoc: restore line anchors to the source view.
These were removed when adding the -analysis flag (CL
60540044), ostensibly for performance, but I can't reproduce
the serious slowdowns I saw then.  In any case, they are
needed for certain URLs.

Fixes golang/go#7743

LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/86150043
2014-04-09 15:41:18 -04:00
Brad Fitzpatrick
87f95283ac imports: limit local disk concurrency, avoid reads in non-Go directories
If $GOPATH was large, or $GOPATH was $HOME and $HOME/src had
many files, the unbounded concurrency in loadPkgIndex/loadPkg
could make the operating system unhappy with so many
threads. (sigh once again for no async file IO and needing
threads for file operations)

In addition, don't call go/build.Context.Import on directories
that we've already determined to have no go files in them.
It's just a waste of time. Makes it about 3x faster on my
machine with hot caches and a big $HOME/src.

Fixes golang/go#7731

LGTM=iant, adg
R=golang-codereviews, iant, adg
CC=david.crawshaw, golang-codereviews
https://golang.org/cl/85670044
2014-04-08 16:43:52 -07:00
Robert Griesemer
fa0f6bd591 go.tools/cmd/godex: update documentation
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/83580046
2014-04-07 13:49:05 -07:00
Robert Griesemer
42a4cd3392 go.tools/godoc: sanitize function signatures for object index
Fixes golang/go#7703.

LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/84410045
2014-04-07 12:54:28 -07:00
Brad Fitzpatrick
93a9176852 dashboard/builder: pass GO386 to child builder, like GOARM
Update golang/go#7720

LGTM=dave
R=adg, dave
CC=golang-codereviews, rsc
https://golang.org/cl/84410046
2014-04-06 17:15:49 -07:00
Alex Brainman
2961704231 go.tools/cmd/godoc: correct TestCLI match string on windows
Fixes golang/go#7707

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/84280045
2014-04-06 12:41:24 +10:00
Robert Griesemer
55ea531257 go.tools/godoc: ignore //line comments in source code
Per suggestion from Gary Burd.

Fixes golang/go#5247.

LGTM=rsc
R=bgarcia, rsc
CC=golang-codereviews
https://golang.org/cl/84050044
2014-04-03 13:12:54 -07:00
Alan Donovan
bf97d00464 go.tools/.hgignore: ignore *.got files from "golden file" testing.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/83680043
2014-04-02 16:42:42 -04:00
Robert Griesemer
0b23073b5c go.tools/go/types: type-check interfaces in reverse dependency order
Side-effect: Because interfaces are now type-checked in reverse order,
cycle errors in interface declarations appear at the "end" rather than
at the "beginning" of the cycle in the source code. This is harmless.
Eventually we may want to do dependency order determination and thus
cycle detection for all types before fully type-checking them, which
might simplify some code and also produce consistently positioned cycle
errors again.

Fixes golang/go#7158.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/83640043
2014-04-02 11:42:29 -07:00
Alan Donovan
14aef25050 go.tools/refactor/eg: remove debugging code accidentally committed.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/83650043
2014-04-02 12:39:10 -04:00
Alan Donovan
bfcffc697d go.tools/refactor/eg: an example-based refactoring tool.
See refactor/eg/eg.go for details.

LGTM=crawshaw
R=crawshaw, gri, kamil.kisiel, josharian
CC=golang-codereviews
https://golang.org/cl/81010043
2014-04-02 12:24:55 -04:00
Robert Griesemer
d7048bec64 go.tools/go/types: simplified init dependency data structures
Preparation for fixing issue 7158.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/83160045
2014-04-02 09:01:28 -07:00
Robert Griesemer
fb8f3e8fbf go/tools/cmd/godex: print combined method sets
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82890044
2014-04-02 08:49:21 -07:00
Robert Griesemer
3d9dcf408f go.tools/go/types: comment fixes - no code changes
TBR=adonovan

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80430045
2014-03-31 16:48:42 -07:00
Robert Griesemer
4f89dd6aed go.tools/go/importer: record low-level encoding format
This avoids confusion when trying to read correctly
encoded export data that happens to be encoded in
a different format (debug vs product).

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82090043
2014-03-31 09:49:52 -07:00
Andrew Gerrand
58edf2a69d go.tools/dashboard: option to show only "first-class" ports
LGTM=rsc
R=rsc, minux.ma, iant, oleku.konko
CC=golang-codereviews
https://golang.org/cl/81730043
2014-03-31 08:54:14 +11:00
Robert Griesemer
4775a5ed46 go.tools/cmd/godex: remove spurious println
TBR=adonovan

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82040043
2014-03-28 15:26:40 -07:00
Robert Griesemer
723686bb4b go.tools/cmd/godex: permit absolute paths for gccgo-generated package (export) files
TBR=adonovan

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82030043
2014-03-28 15:17:20 -07:00
Robert Griesemer
7e60d06cfc go.tools/cmd/godex: don't generate prefixes for local and absolute path arguments
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/81340047
2014-03-28 14:59:25 -07:00
Robert Griesemer
1faba6e3b8 go.tools/cmd/godex: replicate path logic for gccgo-new importer
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/81990043
2014-03-28 14:50:14 -07:00