1
0
mirror of https://github.com/golang/go synced 2024-11-19 06:54:39 -07:00
Commit Graph

842 Commits

Author SHA1 Message Date
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
Robert Griesemer
250eb11b9b go.tools/go/gccgoimporter: backported some changes from godex implementation
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/82000043
2014-03-28 14:24:35 -07:00
Robert Griesemer
700390eaed go.tools/cmd/godex: fix prefix generation, filtering, formatting
Details:
- auto-generate prefixes for std lib (e.g., "godex big" works now)
- apply filtering to package-level objects only
- nicer formatting of single-entry const, var, or type declaration

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/81360046
2014-03-28 12:21:51 -07:00
Robert Griesemer
069e8474de go.tools/go/types: print meaningful panic for unknown expressions
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/81310045
2014-03-27 15:47:04 -07:00
Alan Donovan
f35b5691f3 go.tools/godoc: fix two regressions caused by -analysis CL.
- Add missing methodset.html template file.
- Suppress initial display of package callgraph.
  Client-side JS will make it visible if there is data.

LGTM=bgarcia
R=crawshaw, bgarcia
CC=golang-codereviews
https://golang.org/cl/81550043
2014-03-27 15:30:14 -04:00
Robert Griesemer
f293460f67 go/tools/cmd/godex: don't print unexported methods
and print exported methods of unexported types

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80920046
2014-03-27 10:49:59 -07:00
Robert Griesemer
33f2a1701b go.tools/go/types: minor internal cleanup
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80960046
2014-03-27 10:03:51 -07:00
Alan Donovan
2414677bb9 go.tools/go/loader: add Config.ParserMode configuration parameter.
Existing tools use the default value of zero; their behaviour is unchanged.
(*Config).ParseFile is used only from tests.

LGTM=crawshaw, rsc, gri
R=crawshaw, gri, rsc
CC=golang-codereviews
https://golang.org/cl/79290044
2014-03-27 12:50:26 -04:00
Robert Griesemer
8b161c33a9 go.tools/cmd/godex: support for common path prefixes
All of these work now as expected:

        godex code.google.com/p/go.tools/go/types
        godex go.tools/go/types
        godex go/types
        godex types

Also improved logging/verbose mode.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80930043
2014-03-26 14:47:52 -07:00
Robert Griesemer
03478d3d3e go.tools/cmd/godex: better argument handling
1) Split a path.name argument at the last '.' that
   is not part of the path.

2) Try various importers always in the same order
   for consistent results (use lists instead of maps).

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/80790043
2014-03-26 09:54:20 -07:00
Robert Griesemer
8648e1a481 go.tools/cmd/godex: nicer formatting
- handle indentation
- write non-empty tuples and signatures in multiple lines
- don't crash for package unsafe

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/79920044
2014-03-26 08:38:40 -07:00
Robert Griesemer
4a27ee3a1b go.tools/cmd/godex: a tool to dump export information
Initial implementation. Lots of missing pieces.

Example use:
        godex math
        godex math.Sin
        godex math.Sin math.Cos

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/76890044
2014-03-25 15:26:38 -07:00
Sameer Ajmani
a1c1cf19ba imports: extend findImports to return a boolean, rename, that tells
goimports to use the package name as a local qualifier in an import.
For example, if findImports("pkg", "X") returns ("foo/bar",
rename=true), then goimports adds the import line:
  import pkg "foo/bar"
to satisfy uses of pkg.X in the file.

This change doesn't add any implementations of rename=true, though one
is sketched in a TODO.

LGTM=crawshaw
R=crawshaw, rsc
CC=bradfitz, golang-codereviews
https://golang.org/cl/76400050
2014-03-25 09:37:10 -04:00
Robert Griesemer
a781b00b0d go.tools/go/types: avoid spurious "declared but not used" errors in case of other errors
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/76810044
2014-03-20 11:28:26 -07:00
Alan Donovan
a4491f08bf go.tools/oracle: fix bug in reduceScope on ad-hoc main packages.
LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/77450048
2014-03-19 14:00:35 -04:00
Robert Griesemer
6256e2d81b go.tools/go/types: use package-local type names in errors referring to operands
LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/77670043
2014-03-19 09:36:06 -07:00