1
0
mirror of https://github.com/golang/go synced 2024-11-06 03:26:15 -07:00
Commit Graph

1346 Commits

Author SHA1 Message Date
Nathan John Youngman
806f1dbf43 tools/cmd/stringer: fake import C.
Avoid error "could not import C (can't find import: C)"
Fixes golang/go#9169.

LGTM=adonovan, r
R=golang-codereviews, adonovan, r
CC=golang-codereviews
https://golang.org/cl/184730043
2014-11-27 15:36:14 +11:00
Andrew Gerrand
354b6ccbcc x/tools/cmd/godoc: add golang.org/x/oauth2 import path
LGTM=r
R=jbd, r
CC=golang-codereviews
https://golang.org/cl/175700043
2014-11-26 15:31:30 +11:00
Andrew Gerrand
8dfc1ba4d0 x/tools/dashboard/app: have cron.yaml point to build.golang.org
LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/174600043
2014-11-24 18:08:25 +11:00
Andrew Gerrand
566014162e x/tools/godoc/redirect: handle Rietveld and Gerrit CLs at /cl/
LGTM=rsc, dsymonds
R=rsc, dsymonds
CC=golang-codereviews
https://golang.org/cl/177260043
2014-11-24 13:25:05 +11:00
Robert Griesemer
cc6170934b go/exact: handle unknowns consistently
Fixes golang/go#9147.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/180110043
2014-11-21 13:08:59 -08:00
Alan Donovan
a9651d6ad7 cmd/callgraph: add -algo=static and -algo=cha options.
"static" ignores dynamic calls altogether.

"cha" uses Class Hierarchy Analysis, which assumes that a
dynamic call may dispatch to any func or method that satisfies
the type.

Both these algorithms can work on partial programs,
e.g. libraries without a main function or tests.

(This feature was requested after my talk last night.)

+ Tests.

LGTM=sameer
R=sameer, minux
CC=golang-codereviews, gri
https://golang.org/cl/176780043
2014-11-21 11:07:56 -05:00
Alan Donovan
ce7df396da go/pointer: fix two crashes caused by 'print()'.
+ Test.

LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/173540043
2014-11-20 13:33:20 -05:00
Andrew Gerrand
4f9827a99d x/tools/cmd/godoc: fix bad repository path
Not caught by inattentive reviewer. Pick up your game, people.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/180880043
2014-11-19 15:51:44 +11:00
Andrew Gerrand
1536a92c03 x/tools/cmd/godoc: add golang.org/x/review custom import path
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/174410043
2014-11-19 14:03:19 +11:00
Andrew Gerrand
a3be5384d5 x/tools/godoc/redirect: add redirect for Gerrit reviews at /review/
LGTM=rsc, bradfitz
R=bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/178960043
2014-11-19 08:51:39 +11:00
Alan Donovan
0088b7ecd7 go/types: don't panic if DefaultImport==nil, until we actually use it.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/178860044
2014-11-17 15:24:12 -05:00
Alan Donovan
89c9513804 go/types/typeutil: add an example of Map usage.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/177740043
2014-11-17 13:54:36 -05:00
Alan Donovan
d75c6bdb8f cmd/oracle: minor fixes.
- print "oracle:" not "Error:" in error messages; remove period.
- allocate token.FileSet correctly.
- remove stale TODO (multiple test packages)
- fix typo and omission ('what') in usage message.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/178860043
2014-11-17 13:50:23 -05:00
Alan Donovan
4162082cba x/tools/*: print program name, not "Error", when reporting command error messages.
Such messages are more informative when the error occurs deep within a script.

Also: add tool name to digraph's usage messages.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/173380043
2014-11-17 12:58:28 -05:00
Alan Donovan
0ae83e44ba refactor/rename: add missing operand to fmt.Errorf
TBR=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/177920043
2014-11-17 12:17:16 -05:00
Andrew Gerrand
33b1bf3b85 x/tools/dashboard/env: bump known good builder revision
LGTM=dsymonds
R=dsymonds
CC=golang-codereviews
https://golang.org/cl/176900043
2014-11-17 13:08:44 +11:00
Andrew Gerrand
9920aceb57 x/tools/dashboard/builder: only write VERSION file if it doesn't exist
LGTM=dsymonds
R=dsymonds
CC=golang-codereviews
https://golang.org/cl/172610043
2014-11-17 12:06:56 +11:00
Andrew Gerrand
c2c2cf49ad x/tools/dashboard/app: ignore freebsd-arm failures
The previous instance of this change was applied to the release branch.
I don't know why the codereview plugin allowed me to do this.
Thankfully we won't be using it for much longer.

TBR=dfc
R=dave
CC=golang-codereviews
https://golang.org/cl/175870044
2014-11-17 11:32:13 +11:00
Alan Donovan
c13d674f5e go/callgraph/rta: rename from go/rta
LGTM=sameer
R=sameer
CC=golang-codereviews, gri
https://golang.org/cl/175770043
2014-11-14 11:02:44 -05:00
Alan Donovan
50755a56a8 go/ssa: report memory consumption separated by phase in stdlib_test
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/170600043
2014-11-13 13:03:59 -05:00
Alan Donovan
b8d26f5b94 tools: minor comment fixes.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/173170043
2014-11-13 12:34:25 -05:00
Andrew Gerrand
c05aea77a9 x/tools/dashboard/app: use ?branch=foo to show foo branch commits
LGTM=rsc
R=bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/167660043
2014-11-13 21:53:13 +11:00
Robert Griesemer
c2b324b9b4 cmd/callgraph: fix build
TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/171640043
2014-11-12 16:49:47 -08:00
Robert Griesemer
932b62a02f go/types: add missing nil check in Info.TypeOf
Also use type assertions in a more defensive
way (check for != nil rather than ok).

LGTM=dsymonds, adonovan
R=adonovan, dsymonds
CC=golang-codereviews
https://golang.org/cl/169480043
2014-11-12 15:39:43 -08:00
Alan Donovan
b8a5fcfcec cmd/callgraph: a utility for dumping the callgraph of a Go program.
(This functionality is provided by the oracle, but its output
format is inflexible, and the functionality is better suited
to a shell utility.  I may remove the oracle 'callgraph' feature.)

See Usage for details.

+ Test.

LGTM=sameer
R=sameer
CC=golang-codereviews, gri
https://golang.org/cl/164460044
2014-11-12 17:36:22 -05:00
Alan Donovan
194c5aa350 go.tools/go/rta: implement Rapid Type Analysis for Go.
This is an algorithm for callgraph construction that is faster
but much less precise than pointer analysis.
(I evaluated this for the Go Oracle last year but shelved it,
but it's a natural fit for the work Brian is doing on
automatic program minimization.)

LGTM=sameer
R=gri, crawshaw, sameer
CC=bwkster, golang-codereviews
https://golang.org/cl/124690043
2014-11-12 17:34:15 -05:00
Dmitri Shuralyov
a26eca502f go.tools/imports: use same logic as 'go' tool for pruning package search.
The previous logic would descend into "_"-prefixed names, "testdata" folders,
and skipped folders beginning with a digit.

Fixes golang/go#8958.

LGTM=bradfitz
R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/167000043
2014-11-12 12:45:17 -08:00
Alan Donovan
c097262a24 cmd/digraph: support Go-style double-quotes in input data.
+ test.

LGTM=sameer
R=sameer
CC=golang-codereviews, gri
https://golang.org/cl/170090043
2014-11-12 13:37:06 -05:00
Alan Donovan
fb44a24d4c refactor/rename: fix crash when renaming anonymous struct field that's a qualified reference
(or a pointer, or both).

+ test

Fixes bug 8924

LGTM=sameer
R=dominik.honnef, sameer
CC=<dominik.honnef, golang-codereviews
https://golang.org/cl/158920043
2014-11-10 16:03:40 -05:00
Andrew Gerrand
ab43333964 x/tools/dashboard/app: respect gohash in Commit.AddResult
This should fix the issue where results sub-repo results are clobbered
by subsequent commits. (Much like the previous fix, which only
fixed the issue for main repo commits.)

TBR=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/167440044
2014-11-10 13:58:29 +11:00
Andrew Gerrand
8bd0dd9d19 x/tools/dashboard/coordinator: provide build key in / and /root
LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/170260044
2014-11-10 13:22:35 +11:00
Andrew Gerrand
df7f175a64 x/tools/dashboard/app: revert sub-repo path rename
We're going to keep the old paths in the dashboard until
after Go 1.4 is out the door.

TBR=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/169240044
2014-11-10 13:21:57 +11:00
Andrew Gerrand
42bbc3ebf0 x/tools/dashboard/app: prevent builders from nuking other results
This fixes the issue where a builder would occasionally wipe out
the results from another builder.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/172150043
2014-11-10 13:18:31 +11:00
Andrew Gerrand
3ee677ac1c go.tools/dashboard/env: use newer builder
This version of the builder can handle the new golang.org/x/ paths.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/174750043
2014-11-10 11:49:19 +11:00
Andrew Gerrand
bdb10cf821 go.tools/dashboard/builder: rewrite sub-repo paths before 'go get' and 'go test'
The dashboard still uses the old "code.google.com/p/go.*" import paths.
Rewrite them to the new "golang.org/x/*" before running 'go get' and 'go test'.

Update golang/go#9079.

LGTM=rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/174740043
2014-11-10 10:42:45 +11:00
Andrew Gerrand
5ebbcd132f go.tools: use golang.org/x/... import paths
Rewrite performed with this command:
  sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
    $(grep -lr 'code.google.com/p/go.' *)

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
2014-11-10 08:50:40 +11:00
Alan Donovan
3191bbae17 go/buildutil: call ReadDir via the build.Context's file system interface
LGTM=gri
R=gri, crawshaw
CC=golang-codereviews
https://golang.org/cl/171920043
2014-11-05 12:34:34 -05:00
Andrew Gerrand
ef648ad89b go.tools/godoc/static: replace bake.sh with "go generate" rule
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/164490043
2014-11-05 16:52:40 +11:00
Austin Clements
348181cdd4 cmd/vet: tests for RET checking, SP checking, and leaf functions
Add tests for recently introduced asm error checks in vet.
This adds tests for the new warnings about functions that
don't store to their return slot before returning or that
store to SP-relative addresses in or beyond the argument
frame.  It also adds a test for leaf function handling on arm,
where the link register is not implicitly saved.

LGTM=rsc
R=rsc
CC=adg, golang-codereviews, r
https://golang.org/cl/166040044
2014-11-03 17:27:41 -05:00
Austin Clements
52f3c4bf8a cmd/vet: update test patterns to include asm function name
vet now includes function names in its error messages about
assembly code.  Update the error test patterns to account for
this and expand some patterns to check that go vet discovers
the function name correctly.

Fixes golang/go#9041

LGTM=r
R=adg, r, rsc
CC=golang-codereviews
https://golang.org/cl/170940044
2014-11-02 12:21:04 -05:00
Alan Donovan
d73c11bfcb refactor/rename: make -from syntax support string literals for complex import paths.
(They may contain any character, after all.)

Also, allow but don't require parens and stars.
e.g. (*"encoding/json".Decoder).Decode or "encoding/json".Decoder.Decode
     but not encoding/json.Decoder.Decode.

Since -from queries are now Go expressions, we use the Go parser.
(Thanks to Rog Peppe for the suggestion.)

LGTM=sameer
R=sameer
CC=golang-codereviews, gri, rogpeppe
https://golang.org/cl/154610043
2014-10-31 15:39:22 -04:00
Andrew Gerrand
cf285cde60 go.tools/dashboard/app: fix tests
TBR=dvyukov
R=dvyukov, bradfitz
CC=golang-codereviews
https://golang.org/cl/165740043
2014-10-31 09:04:03 +11:00
Andrew Gerrand
cce262cd47 go.tools/dashboard/app: remove redundant transaction
The code is already called from inside a transaction.

TBR=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/161580045
2014-10-31 09:03:27 +11:00
Andrew Gerrand
5d1cfb1968 go.tools/cmd/godoc: add handlers for new sub-repo paths
Fixes golang/go#9009.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/162470043
2014-10-31 09:01:52 +11:00
Austin Clements
c7512a5f83 cmd/vet: check return moves, support power64x, various fixes
This adds support for checking moves to the return value stack
slot (from rsc), adds support for checking power64x assembly,
fixes argument offset checking and leaf function support on
platforms with a link register (arm and power64).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/166920043
2014-10-30 11:53:56 -04:00
Alan Donovan
dcf508a4ed astutil: delete unused function RenameTop.
Fixes golang/go#9008
(in a manner of speaking)

LGTM=crawshaw
R=crawshaw
CC=bradfitz, golang-codereviews
https://golang.org/cl/165010043
2014-10-28 12:19:23 -04:00
Alex Brainman
4bb917e48d go.tools/cmd/godoc: wait for godoc to exit before removing tmp directory
otherwise tmp directories do not get deleted on windows

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/166750043
2014-10-28 16:59:58 +11:00
Alex Brainman
30f7e63100 go.tools/godoc: do not assume that all windows paths are delimited by os.PathSeparator (fixes build)
Fixes golang/go#9003.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/161420043
2014-10-28 12:26:29 +11:00
Alex Brainman
d8b266df1c go.tools/cmd/godoc: wait for analysis to complete in TestTypeAnalysis
LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/157590043
2014-10-28 12:25:46 +11:00
Andrew Gerrand
113eb67ee0 go.tools/dashboard/app: update commit in transaction on perf regression
The sendPerfFailMail function populated a dummy commit value and
then calls commonNotify, which then updated and stored that dummy
commit, hosing the original commit entity.

LGTM=rsc
R=rsc, bradfitz, dvyukov
CC=golang-codereviews
https://golang.org/cl/164960043
2014-10-28 11:25:09 +11:00