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

1266 Commits

Author SHA1 Message Date
Alan Donovan
95bd0c4fdf go.tools/go/types: add (*PkgName).ImportedPackage method.
It returns the value formerly returned by Pkg(), i.e. the imported package.
Pkg() now returns the package enclosing the import statement,
which is consistent with all other Objects.

Fixes golang/go#8628.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/136090043
2014-09-02 18:12:08 -04:00
Dmitriy Vyukov
297fd8229c dashboard/app: actually learn noise levels
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/135190043
2014-09-01 12:51:14 +04:00
Matt Jibson
59c8647562 go.tools/cmd/vet: detect suspicious shifts
LGTM=josharian, dsymonds, r
R=golang-codereviews, josharian, minux, dsymonds, dave, axwalk, adg, r
CC=golang-codereviews
https://golang.org/cl/134780043
2014-08-29 11:17:01 -07:00
Robert Griesemer
a4d1505cfc go.tools/go/types: remove Strict mode from API
Also: factor out shared code assertableTo.

LGTM=adonovan
R=adonovan, gordon.klaus
CC=golang-codereviews
https://golang.org/cl/139880043
2014-08-29 09:15:36 -07:00
David Symonds
2b15aa63b7 go.tools/cmd/vet: don't panic on zero arg Log method calls.
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/134000043
2014-08-29 08:56:35 +10:00
Robert Griesemer
4c3c0f68c5 go.tools/go/importer: use platform-specific word size in tests
Hopefully
Fixes golang/go#8366.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/138810043
2014-08-28 15:19:30 -07:00
Brad Fitzpatrick
cd91e8d096 dashboard/builder: modernize ancient exec wrappers
They were from a time before we had the os/exec package, if
memory serves.

Also, make verbose also mean that the main build's stdout
and stderr go to the real stdout and stderr as well.
I'll want that for the Docker-based builder.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/135000043
2014-08-28 14:58:15 -07:00
Robert Griesemer
776a9335ce go.tools/go/types: fix typo in comment
TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/135960043
2014-08-28 14:57:53 -07:00
Robert Griesemer
289e96cc26 go.tools/go/types: no errors for x.(T) where T is an interface
Also: Added Config.Strict flag to enable type checker tests
      beyond the Go 1 specification.

Fixes golang/go#8561.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/134050043
2014-08-28 14:03:10 -07:00
Alan Donovan
cd5b7ff318 go/ssa/interp: add intrinsic for runtime.environ, recently added.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/135120043
2014-08-28 16:56:49 -04:00
Chris Manghane
86df324d65 dashboard: quote metacharacters when searching for gcc commits
LGTM=adg
R=adg
CC=golang-codereviews, iant
https://golang.org/cl/131420043
2014-08-28 13:50:29 -07:00
Robert Griesemer
5dca7d8bd1 go.tools/go/types: LookupFieldOrMethod checks method set
LookupFieldOrMethod now also decides whether a found
method is actually in the method set. Simplifies call
sites. Added corresponding API tests.

TODO (separate CL): Decide what the correct value for
the indirect result should be (as required for code
generation). For now, the result value for indirect
is unchanged from before if a field/method is found.

Fixes golang/go#8584.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/132260043
2014-08-28 13:03:13 -07:00
Robert Griesemer
87b4cd993d go.tools/go/types: don't crash dealing with unknown constants
Also: Better tracing for top-level declarations.

Fixes golang/go#8518.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/132310043
2014-08-28 12:17:30 -07:00
Andrew Gerrand
61ce470a5e go.tools/dashboard/app: fix column order for -temp builders
LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/138760044
2014-08-28 10:57:52 +10:00
Brad Fitzpatrick
f34e673079 dashboard/env: add nacl-386 and nacl-amd64p32 builders
LGTM=adg
R=adg, dave
CC=golang-codereviews
https://golang.org/cl/136830043
2014-08-27 00:10:16 -07:00
Oling Cat
5a1d3be754 go.tools/godoc/static/package.html: remove extra tag; indent with tabs.
LGTM=gri
R=golang-codereviews, gobot, rsc, gri
CC=golang-codereviews
https://golang.org/cl/120380044
2014-08-26 13:22:54 -07:00
Oling Cat
e14fb0e1ee go.tools/godoc/static: indent with tabs.
LGTM=gri
R=golang-codereviews, gobot, gri
CC=golang-codereviews
https://golang.org/cl/120390043
2014-08-26 13:21:29 -07:00
Alan Donovan
4abc8436bc cmd/eg: add -beforeedit flag, which specifies a command to run before editing a file.
e.g. chmod +w, checkout.

Also: add a TIPS section to the documentation.

LGTM=crawshaw
R=crawshaw, gri
CC=golang-codereviews
https://golang.org/cl/136780044
2014-08-26 15:52:40 -04:00
Robert Griesemer
7486f5904a go.tools/go/types: added TODO re: misleading error message
Fix not urgent.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/135810043
2014-08-26 10:56:22 -07:00
Alan Donovan
4aaa1f6f6c go/ssa/interp: fix intrinsics for (*runtime.Func) methods.
They changed when they were ported to Go in CL
https://golang.org/cl/124300044.

LGTM=crawshaw
R=gri, crawshaw
CC=golang-codereviews
https://golang.org/cl/136780043
2014-08-26 11:48:15 -04:00
Alan Donovan
067a2992ee go/pointer: fix runtime.startTimer intrinsic.
The test broke because the actual behaviour of time.startTimer changed in
https://golang.org/cl/129480043.

LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/131280043
2014-08-26 11:08:45 -04:00
Brad Fitzpatrick
cd6dcd8cb5 dashboard/env: fix 32-bit builds
(Fix from adg)

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/136760043
2014-08-26 00:41:41 -07:00
Andrew Gerrand
cb487641b8 go.tools/dashboard: fix integration test
LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/126700043
2014-08-26 17:34:24 +10:00
Brad Fitzpatrick
eb8b4b0d41 dashboard: start of Dockeritization of Linux builders
Good checkpoint. Can now do builds by hand.

Next step is coordinator server in front of this, and things
to fire up beefy GCE instances running CoreOS and each build
in its own Docker container. See README for how to do a single
build.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/134870043
2014-08-26 00:33:19 -07:00
Andrew Gerrand
51353854a4 go.tools/dashboard: display "-temp" builders last
LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/133000043
2014-08-26 14:49:16 +10:00
Paul Nasrat
89156360f9 go.tools/refactor/eg: Support promoted fields and methods.
As per http://golang.org/ref/spec#Struct_types enable eg tool
to wildcard match against promoted fields and methods.

LGTM=adonovan
R=adonovan, gordon.klaus
CC=golang-codereviews
https://golang.org/cl/129260043
2014-08-25 16:26:54 -04:00
Rob Pike
cd9959d796 go.tools/cmd/vet: validate calls to t.Log and t.Logf
Be careful not to complain about math.Log and cmplx.Log.
Seems worthwhile since t.Log and t.Logf are often written but
rarely executed.

Nothing new turned up in the standard library.

Fixes golang/go#8504.

LGTM=josharian, dsymonds
R=golang-codereviews, josharian, dsymonds
CC=golang-codereviews
https://golang.org/cl/130490043
2014-08-25 12:31:49 -07:00
Rob Pike
671b9204b8 go.tools/cmd/vet: change message for range check
s/enclosed by function/captured by func literal/
Users complained. They often do.

LGTM=josharian, adg
R=golang-codereviews, josharian, nightlyone, minux, adg
CC=golang-codereviews
https://golang.org/cl/132080043
2014-08-24 17:26:18 -07:00
Fatih Arslan
ba91af23b8 cmd/cover: add start lines numbers to each function in -func mode
This CL aims to fix the problem described here:

https://groups.google.com/forum/#!topic/golang-nuts/R6ms1n9KjiY

This makes it easier to parse via external tools such as editors. Editors can
show each function in a list and jump directly to each function with this
additional information. This pattern can be seen in other Go tools such as "go
test" in the form of:

--- FAIL: TestCover (0.52 seconds)
        cover_test.go:43: example error

LGTM=adg
R=r, adg, josharian, dave
CC=golang-codereviews
https://golang.org/cl/131820043
2014-08-21 16:28:12 -07:00
Andrew Gerrand
277e5a16d7 go.tools/godoc: mention sub-repos and package indexes on packages page
Also several cosmetic tweaks to the package page.

LGTM=r, bradfitz
R=bradfitz, r
CC=golang-codereviews
https://golang.org/cl/128490043
2014-08-21 09:53:57 +10:00
Rob Pike
f11381f265 go.tools/cmd/cover: don't assume code is gofmt'd
We want to make an if look like two blocks and have the coverage
report for the else block decorate the "else" keyword with the right
color. To do this, we adjust the apparent starting point of the else
block to include the "else".

The previous code assumed the way to do this was to move the
width of "else " backwards from the else block's opening brace, but
that assumes there is a space there. Instead, we now just start the
else block exactly at the end of the if block. Simpler, cleaner, and
fixes a bug.

Fixes golang/go#8557.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/127620043
2014-08-20 11:14:50 -07:00
Andrew Gerrand
c21a767b2c go.tools/dashboard/app: reject /commit requests from old builders
This is so that we don't corrupt our commit history with reports
from old builders, after the migration to the latest build dashboard.

LGTM=dvyukov
R=dvyukov
CC=golang-codereviews
https://golang.org/cl/130300043
2014-08-20 21:45:01 +10:00
Dmitriy Vyukov
5d476c5293 dashboard/app: dedup changes in UI
Currently for every benchmark/metric we show all changes for all builders x procs.
With 4 builders and 5 procs, that's 20 changes (20 red/green boxes in a single cell).
Instead show only maximum change for every benchmark/metric.
This significantly reduces clutter in UI.
When you click on the red/green box, you can see the rest of the changes.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/126430043
2014-08-20 13:24:05 +04:00
Dmitriy Vyukov
1d2a500105 dashboard/app: allow to gob-encode PerfChange
Currently appspot logs say:
delay: gob encoding failed: gob: type build.PerfChange has no exported fields
And I was thinking why it is not sending mails...

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/125480043
2014-08-20 13:20:12 +04:00
Francesc Campoy
e8a1924bfb html2article: Ignore empty anchor elements and obtain the original url from Google Docs
LGTM=adg
R=adg, campoy
CC=golang-codereviews
https://golang.org/cl/127560043
2014-08-19 17:55:46 -07:00
Dmitriy Vyukov
f579fb3656 dashboard/app: eliminate more flakes
Currently we still see some flakes on perf dashboard (e.g. sys-stack is quite frequent).
I am planning to run real perf builder with 5 different values of GOMAXPROCS,
so we can require 3 builders to agree on a change instead of 2.
This will provide 20x improvement in flake detection.
At the same time lower noise bar from 1.2 to 1.1, as I see some real perf changes gets ignored as noise.

All these magic numbers affect only representation of data, but not the data stored in DB.
So we can continue freely tuning them later. There are no significant risks here.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/127520044
2014-08-19 16:22:27 +04:00
Andrew Gerrand
92eb99d907 go.tools/dashboard: fix various small UI issues
- stop time column from wrapping,
- fix pagination on front page,
- left-align pagination buttons.

LGTM=dvyukov
R=dvyukov, golang-codereviews
CC=golang-codereviews
https://golang.org/cl/126410043
2014-08-19 20:43:50 +10:00
Alan Donovan
845abca4e3 go/types/typeutil: Dependencies utility returns transitive closure of import graph.
(Used by forthcoming 'singlefile' command.)

+ Test.

LGTM=bwkster, gri
R=gri, bwkster
CC=golang-codereviews
https://golang.org/cl/130100043
2014-08-18 22:31:56 -04:00
Josh Bleecher Snyder
cc1e254c18 go.tools/astutil: delete all matching imports in DeleteImport
Fixes golang/go#8459.

LGTM=crawshaw, bradfitz
R=bradfitz, crawshaw
CC=golang-codereviews
https://golang.org/cl/128220043
2014-08-14 11:51:51 -07:00
Alan Donovan
f13ba78920 go.tools/go/loader: make error message for massive failure (e.g. no "fmt") more concise.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/126080043
2014-08-14 12:10:34 -04:00
Andrew Gerrand
c98886f21f go.tools/dashboard/builder: use https to talk to dashboard
LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://golang.org/cl/125100043
2014-08-13 10:54:52 +10:00
Andrew Gerrand
2607e9b47a go.tools/dashboard/app: add go.sys to builder package list
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/129030043
2014-08-13 07:55:36 +10:00
Andrew Gerrand
573fa9f0bd cmd/cover: show file coverage in HTML drop down
As requested on Stack Overflow: http://goo.gl/ams9fY
(Kudos to sberry for his JavaScript solution, provided there.
This change does the same thing on the server side.)

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/127030043
2014-08-12 09:22:11 +10:00
Alan Donovan
cd6b8ab06d go.tools/go/ssa: improvements to CreateTestMainPackage.
(1) support Example functions defined in programs that don't
    import "testing".  We emit code to testmain.main() to call
    them directly, since we can't call testing.Main.

(2) expose a FindTests function which reports the set of
    Test, Example and Benchmark functions it finds.
    Certain clients need this.

Added test for logic in FindTests.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/115290048
2014-08-08 14:47:16 -04:00
Robert Griesemer
8ce35843de go.tools/go/types: handle all receiver errors in go/types
Pending parser change in CL 123010044.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/125830043
2014-08-07 12:45:28 -07:00
Alan Donovan
3bbc63016b go.tools/go/loader: report parser errors too.
Previously these were recorded in the PackageInfo, but not
reported to the user's error handler (types.Config.Error),
which is typically what prints them.

Minor subtlety: that function must now be able to handle error
values that are not of type types.Error.

+ Test (and renamed it).

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/121290043
2014-08-07 12:50:15 -04:00
Alan Donovan
d3f2df4854 go.tools/go/ssa/interp: some fixes to tests
- Break out parts of coverage.go into more specific files.
- Re-enable test of nil interface-to-interface conversion.
- Update initorder test to reflect spec ambiguity and gc vs go/types variance.
- Re-enable test dependent on now-fixed bug 8189 ("value,ok" yields an untyped bool)

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/119530043
2014-08-07 10:57:00 -04:00
Francesc Campoy
11569f39ea go.tools/cmd/present: track page views for every slide.
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/124720043
2014-08-05 16:02:39 -07:00
Robert Griesemer
b31dcd1655 go/types: comma-ok expressions return untyped boolean as 2nd result
Per acceptance of https://golang.org/cl/112320045/ .

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/113990043
2014-08-05 11:34:36 -07:00
Francesc Campoy
82b913fb17 playground: add ctrl-enter shortcut for gofmt (as in the tour)
LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/120420044
2014-08-04 15:55:39 -07:00