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

1665 Commits

Author SHA1 Message Date
Josh Bleecher Snyder
97b1f37055 cmd/present: do not show help text on localhost
Also allow escape key to hide help text.

Fixes golang/go#9950

Change-Id: Ifcffbafda68d383e529f4ad6119b384a9c5cef6a
Reviewed-on: https://go-review.googlesource.com/5531
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-02-23 10:31:29 +00:00
Egon Elbre
e0e177e896 cmd/present: Fixed printing of slides.
I moved print.css into styles.css - to make it obvious that it needs to be
considered when modifying the styles.css. I use @media screen for all the
framwork related css, this means the @media print doesn't have to start
overriding each property - also there's less chance of a problem when
something isn't overridden.

Change-Id: Ic58e8c80df3339b55f67140a47866a232e0d30a3
Reviewed-on: https://go-review.googlesource.com/5526
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-02-23 02:47:45 +00:00
Alan Donovan
51931f86bf go/loader: define a FindPackage hook for build systems not compatible with "go build".
Google's proprietary build system, for example, does not use the
_test.go suffix to distinguish test from non-test files; this
information is stated explicitly in another form.

Change-Id: I3a8e919dbc556b6d5cfea1d2123da2616bd934d4
Reviewed-on: https://go-review.googlesource.com/5450
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-02-20 17:56:13 +00:00
Alan Donovan
f96426939c go/ssa: minor doc tweaks.
Change-Id: I116405d5014e4f2bccfff91e01945e10feacf9ee
Reviewed-on: https://go-review.googlesource.com/5442
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-02-20 16:00:52 +00:00
Andrew Gerrand
2a105dc4ba doc: add CONTRIBUTING.md
Change-Id: I121e02f941c4996d4ea44b699f2e10259bc0a665
Reviewed-on: https://go-review.googlesource.com/5219
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-02-18 23:43:38 +00:00
Alan Donovan
9bdc591373 go/ssa: standardize parsing of BuilderMode flags.
ssadump's -build=G option is now spelled -import; it was never related to ssa.

Change-Id: Ic21cd8b6990c0ffd25651c17a842a63bfa5019cf
Reviewed-on: https://go-review.googlesource.com/5172
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-02-18 18:34:24 +00:00
Nigel Tao
10d7cacb91 cmd/vet: add color.CMYK to the whitelist of frozen structs.
Change-Id: I5164ef9a998a0807f80668b9140eac4b2f889049
Reviewed-on: https://go-review.googlesource.com/4997
Reviewed-by: David Symonds <dsymonds@golang.org>
2015-02-17 02:58:17 +00:00
Andrew Gerrand
753a094e8a cmd/present: show navigational help text on page load
Change-Id: I35e7cbec56a0617540316f0205c5a92e7532c491
Reviewed-on: https://go-review.googlesource.com/4910
Reviewed-by: Minux Ma <minux@golang.org>
2015-02-14 23:26:36 +00:00
Robert Griesemer
229cb67603 go/gccgoimporter: disable test case (fix build, at least partially)
Change-Id: I021c4b4525006d27dd63f6eee16a5d219f6ba9dc
Reviewed-on: https://go-review.googlesource.com/4750
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-02-12 21:45:02 +00:00
Michael Matloob
d29758bc2e cmd/gomvpkg: fix import rewrites for top-level moved package
The top-level moved package was skipped when doing import rewrites.
Don't skip that package.

Fixes #9811

Change-Id: I1c524ed44606586b5231e5adb6168079aa0e0228
Reviewed-on: https://go-review.googlesource.com/4470
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-02-11 15:58:22 +00:00
Andrew Gerrand
88df7a741d cmd/godoc: add golang.org/x/tour meta redirect
Change-Id: I2b855bb166612af391bb99742f6b6d58bc3ec226
Reviewed-on: https://go-review.googlesource.com/4340
Reviewed-by: David Symonds <dsymonds@golang.org>
2015-02-10 05:48:21 +00:00
Alan Donovan
159ae4d163 cmd/callgraph: fix careless quoting bug
Change-Id: I809a2ea711bb1a516dfcf8abf5e4d26061b4daf0
Reviewed-on: https://go-review.googlesource.com/4230
Reviewed-by: Sameer Ajmani <sameer@golang.org>
2015-02-09 17:53:43 +00:00
Robert Griesemer
fa3649f71f go/types: don't permit implicit assignments to unexported struct fields via literals
Change-Id: I74eec172ba5a319f91c95e33b047f489dfce0c95
Reviewed-on: https://go-review.googlesource.com/4090
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-02-06 20:42:57 +00:00
Nigel Tao
9622599500 cmd/vet: allow spaces in struct tag values.
The validateStructTag code now closely mimics the StructTag.Get code in
package reflect.

This addresses the comment raised on issue #9500:
https://github.com/golang/go/issues/9500#issuecomment-70218780

See also https://go-review.googlesource.com/3953

Change-Id: I583f7447dbc5a2d7ecbb393d9bb6b1515cb10b18
Reviewed-on: https://go-review.googlesource.com/3952
Reviewed-by: Rob Pike <r@golang.org>
2015-02-06 02:26:15 +00:00
Joël Stemmer
913f41fc5f cmd/vet: warn about zero arg index in print format
Argument indexes in a format string are one-based, however vet would not
warn when using a zero-index unless the type of the argument referenced
was not a string. That warning was misleading as it would say the type
was not a string. Vet will now print a correct warning when using a zero
index.

Included are tests for both cases.

Fixes #9752

Change-Id: I285e99990a86a653b4668b0c279d5f5f1c34f7aa
Reviewed-on: https://go-review.googlesource.com/3692
Reviewed-by: Rob Pike <r@golang.org>
2015-02-04 18:31:58 +00:00
Alan Donovan
0dda50d42a go/loader: improve robustness in face of input errors
Before this change, many kinds of error would cause the loader to stop.
    making it brittle when analyzing large codebases, as in "godoc -analysis".

    This change moves operations that used to occur during
    configuration---(*build.Context).Import, loading, and parsing of
    initial packages---into the Load call, and ensures that all failures
    during Loading are reported at the end so that the maximum amount of
    progress is made.

    Also: redesign the tests and add many new cases.

Change-Id: Ia8cd99416af7c5d4a5fe133908adfa83676d401f
Reviewed-on: https://go-review.googlesource.com/3626
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-02-02 20:01:59 +00:00
Matt T. Proud
7f3a9aa4e4 benchmark/parse: fix cosmetic defect in error str.
The "Benchmark" header parser's error string lacked a closing double
quotation mark.

Change-Id: I2361cc86866296503f2733aa84b3fd52cdf33c09
Reviewed-on: https://go-review.googlesource.com/3683
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-02-02 17:07:43 +00:00
Robert Griesemer
1afe783e9f go/types: update testdata (fix build)
Change-Id: Ifd38444c7c22f65f6e85fe6233b01703d1d14b4f
Reviewed-on: https://go-review.googlesource.com/3540
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-29 22:22:27 +00:00
Andrew Gerrand
39a2d013be cmd/tipgodoc: set GOROOT_BOOTSTRAP environment variable
Change-Id: I7d5dc5f7510641d2976f2ea6acf0d52cb10b94e8
Reviewed-on: https://go-review.googlesource.com/3266
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-24 16:29:45 +00:00
Alan Donovan
84312aa521 refactor/rename: clarify usage message
In the example, we use backslashes (not single quotes) to escape
double-quotes since it works on both Windows and POSIX.

Change-Id: Id883f5457bec4d8a36d5b12c759ad385125a98a6
Reviewed-on: https://go-review.googlesource.com/2862
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-23 18:40:31 +00:00
Alan Donovan
d569772660 Extend duplicate check to exported wrappers
Change-Id: I892fca0a374476aa9e65bf26fb03b73d6a0ae75a
Reviewed-on: https://go-review.googlesource.com/1583
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-23 18:36:53 +00:00
Alex Brainman
2ef5a0d23b refactor/rename: make tests pass on windows (fixes build)
- use import path not file path in go/buildutil.FakeContext OpenFile;
- use regexp to compare error messages in TestErrors, because
  they contain windows file paths;
- use OS file path (not unix path), when checking move results
  in TestMoves.

Change-Id: Ib62d344acb551fb612d8a0773ae1ab5f18341294
Reviewed-on: https://go-review.googlesource.com/3171
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-23 05:30:55 +00:00
Alan Donovan
96af1504f6 go/ssa: add list-of-tests constant to generated testmain package
And log its value in godoc -analysis.

Related to issue 8968

Change-Id: I96a96922a3fa5c434c69e0faff1cc8ec4686b6f2
Reviewed-on: https://go-review.googlesource.com/3154
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-22 22:45:41 +00:00
Alan Donovan
f011631cea go/ssa: simplify TypesWithMethodSets
Details:
- rename (*Program).TypesWithMethodSets() to RuntimeTypes()
- delete (*Package).TypesWithMethodSets() method and simplify
- move code to methods.go
- update test to use

1-2% improvement in space and time (though I barely trust this data
because the GC at tip is in such terrible state).

Change-Id: I38eab78b11e0ad0ff16e0530e775b6ff6a2ab246
Reviewed-on: https://go-review.googlesource.com/3148
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-22 14:03:32 +00:00
Alan Donovan
e079f6c632 go/ssa: change import path of synthetic test package to "test$main"
...to avoid namespace conflicts.
Also make its name "main", since it defines func main().

And fix 2 typos.

Change-Id: I7cf7894d6bed134907b3d2742255e5a82426071b
Reviewed-on: https://go-review.googlesource.com/3150
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-21 22:21:01 +00:00
Alan Donovan
4d45c85020 go/types: expose IsInterface predicate, eliminating 6 copies
Change-Id: I3704d7bd7a11f691c66556c1b77ef79a503d2fe9
Reviewed-on: https://go-review.googlesource.com/2173
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-21 18:49:27 +00:00
Andrew Gerrand
d702aaaabe cmd/godoc: add golang.org/x/build to go-import redirect list
Change-Id: Id372b2da716b31bc016855d2d7f783fd1764e5c0
Reviewed-on: https://go-review.googlesource.com/3110
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-21 06:59:18 +00:00
Andrew Gerrand
cb6b359e69 dashboard: delete after move to the golang.org/x/build repository
Change-Id: I04335eb643d342fa7de1f39fc3fc26b1543a60e1
Reviewed-on: https://go-review.googlesource.com/3078
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-21 06:38:18 +00:00
Brad Fitzpatrick
b34c44b0e2 dashboard: buildlet client, server, and gomote enhancements
- get tarballs out of buildlets
- gomote can pass arguments to buildlet's exec handler
- buildlet's exec handler can run system-level commands
- hard-code GOROOT_BOOTSTRAP to be "go1.4" under the workdir
- adjust MTU size on GCE

etc

Change-Id: I73e18b7a5e395a889f5ee93ba9850d331ffb7812
Reviewed-on: https://go-review.googlesource.com/3052
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-21 02:32:54 +00:00
Dominik Honnef
4a084c7791 refactor/rename: allow passing -force flag from Emacs
Change-Id: Iac9355bc8a98cf61cb3d4ff871723ce466d38531
Reviewed-on: https://go-review.googlesource.com/2912
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-20 22:08:13 +00:00
Brad Fitzpatrick
b09f9e69fa dashboard/cmd/buildlet: support for writing files from tgz URL directly
Client + server support, and gomote flags.

Change-Id: I91320f47731f8c69b84c4961028bfbbdfc85467a
Reviewed-on: https://go-review.googlesource.com/3029
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-20 04:00:09 +00:00
Brad Fitzpatrick
3aad931e88 dashboard: start of cmd/gomote buildlet client, more packification
Change-Id: I874f4f5ef253cf7f1d6d5073d7c81e76fa1de863
Reviewed-on: https://go-review.googlesource.com/2981
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-20 03:05:44 +00:00
Brad Fitzpatrick
3ecc311976 dashboard: move buildlet exec code from coordinator to client package
Change-Id: I778ac78ed02be9f67436ec045a3816dfc24afda3
Reviewed-on: https://go-review.googlesource.com/2923
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-16 17:58:30 +00:00
Brad Fitzpatrick
d78771bc1c dashboard: create buildlet client package, move coordinator code into it
Operation Packification, step 2 of tons.

Eventually the buildlet client binary will use this stuff now.

Change-Id: I4cf5f3e6beb9e56bdc795ed513ce6daaf61425e3
Reviewed-on: https://go-review.googlesource.com/2921
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-16 16:34:20 +00:00
Jongmin Kim
694e7507fc present: fix References link of talks.golang.org
Change-Id: I797a745dc891483217b732e9bf5413539f8c417e
Reviewed-on: https://go-review.googlesource.com/2954
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-16 16:06:45 +00:00
Nigel Tao
045f02ba9d cmd/stringer: fix ignored error in TestEndToEnd.
Change-Id: Ia139e9da37aecddebe8895c0d3427d7e97d408f8
Reviewed-on: https://go-review.googlesource.com/2931
Reviewed-by: David Symonds <dsymonds@golang.org>
2015-01-15 23:10:50 +00:00
Alan Donovan
771af7e25c go/buildutil: FakeContext: create build.Context of fake file tree, for testing
This refactoring of the tests of go/loader and refactor/rename made it
possible to write some loader tests I wanted, but the new tests reveal
bugs so they're commented out for now.  I will fix them in a follow-up.

Change-Id: Iae3a20681a0a0791076debd4b82bb5ed74b0c577
Reviewed-on: https://go-review.googlesource.com/2825
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-15 22:46:57 +00:00
Brad Fitzpatrick
03b46a3e2f dashboard: move builder configuration out of coordinator into a package
The new package will be used by the buildlet command line tool in the
future.

Also use the metadata package in the coordinator for the master build key,
since it was already depending on that package. Might as well use it.

Change-Id: I6ad7593787ebba364090951ccbaecb4aa38e1dd6
Reviewed-on: https://go-review.googlesource.com/2920
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-15 22:21:59 +00:00
Brad Fitzpatrick
44f7d38ccc dashboard/cmd/retrybuilds: add another flaky detection rule
Change-Id: Ifb88fc7903260e9d32dbeac6bfbc1b60d26bedc8
Reviewed-on: https://go-review.googlesource.com/2891
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-15 21:50:13 +00:00
Brad Fitzpatrick
94e3c965eb dashboard: fixes from tree move, use 'extdep' build tag consistently
extdep means the package has contains external dependencies and will
be omitted from the regular x/tools build + tests.

Change-Id: I48d9161665811f0a0dc988d6f0c25d9c14b9e4ab
Reviewed-on: https://go-review.googlesource.com/2892
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-15 18:52:22 +00:00
Hyang-Ah Hana Kim
e14d0b6f6b cmd/godoc: godoc test needs clean up tmp dir when buildGodoc fails.
Change-Id: I584ed27d37a85d39294b07febf396f567d4016a5
Reviewed-on: https://go-review.googlesource.com/2901
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-15 18:36:28 +00:00
Brad Fitzpatrick
e83451b9c2 dashboard: rearrange tree, in prep for packagification
Package main binaries now go under cmd, leaving the top level for
similarly-named packages.

I'll be moving a lot of data structures and functions out of the
commands and into common packages.

A future CL will also unify all the "+build whatever" restrictions
into one common build tag, since there will be so much package sharing
coming up. Probably they will become "+build extdep", to indicate that
they have dependencies outside of x/tools.

Change-Id: Idc198e0dfa933b5f5de8f2b581533e8d299d2293
Reviewed-on: https://go-review.googlesource.com/2738
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-15 02:58:11 +00:00
Dominik Honnef
9f20d8c198 benchmark/parser, cmd/benchcmp: improve names of exported identifiers
Most of the names have been brought in line with the names used in
testing/BenchmarkResult. For example, NsOp becomes NsPerOp.

Additionally, "Bench" becomes "Benchmark" and "BenchSet" becomes "Set".

Change-Id: I7dfca68a804e285a87ab9692b5bb99ccb676da7f
Reviewed-on: https://go-review.googlesource.com/2610
Reviewed-by: Rob Pike <r@golang.org>
2015-01-15 01:28:17 +00:00
Brad Fitzpatrick
d272cc0504 dashboard/builder: log to stderr when a build fails
Fixes golang/go#9593

Change-Id: I62c8152995db05945fb0c3dd5c62915e45aaeff9
Reviewed-on: https://go-review.googlesource.com/2737
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-01-14 23:47:04 +00:00
Brad Fitzpatrick
31ce909f96 dashboard/coordinator: set timeout when polling buildlet, show more status
Change-Id: I04f1f2bb1f13718a07f6939042b61b3f675ca8be
Reviewed-on: https://go-review.googlesource.com/2735
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-14 23:30:16 +00:00
Brad Fitzpatrick
c573f9d0b5 dashboard/buildlet: fix start-up crash when TLS attributes aren't set
I had never run the 44d7ecb402 on GCE, and never caught that it
crashed on start-up if TLS attributes weren't defined.

Updated to use the new NotDefinedError from the metadata package in
https://code-review.googlesource.com/#/c/1790/

Change-Id: Iaec8df126e4cef8026c930e8cc0163ae088affb3
Reviewed-on: https://go-review.googlesource.com/2736
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-01-14 23:00:17 +00:00
Andrew M Bursavich
ac8637e9fa container/intsets: Intersects, SubsetOf, SymmetricDifference(With)
Just reading through intsets and decided to knock out a few TODOs.

Change-Id: I677dbcc5ff934fbe0f0af09a4741e708a893f8db
Reviewed-on: https://go-review.googlesource.com/2733
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-14 20:51:28 +00:00
Brad Fitzpatrick
84afeba471 dashboard: consolidate upload code, update to new oauth2 libraries
Adds dashboard/upload/upload.go, instead of oddly shoving it as part
of the coordinator/buildongce tool.

And as part of that (in order to compile and test buildongce/create.go
without installing mercurial on this machine), I updated it from
goauth2 to oauth2.

Despite this "just" being a cleanup CL, it took forever because I hit
OAuth2+Cloud Storage+Web UI woes along the way, documented partially
in upload.go. The web UI misled me for a long time. Maybe I shouldn't
have used service accounts, but it does make configuration easier for
upload.go. The buildongce/create.go probably should use them too,
but I can do that later. I'm done cleaning for now.

Change-Id: Icb8e3decb682d3685edffecea2a10fcb4e385e10
Reviewed-on: https://go-review.googlesource.com/2731
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-14 18:11:56 +00:00
Michael Matloob
796e50ba32 cmd/mvpkg: a package moving tool
This change adds a command mvpkg that will move a given package and
update all its imports. It uses similar logic to gorename to update
the imports.

Change-Id: Iebbd0b4c93c2302b0a71c3b99c68f6778106012a
Reviewed-on: https://go-review.googlesource.com/1973
Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-14 17:37:29 +00:00
Alan Donovan
9c9660e35a go/loader: use concurrency to reduce I/O latency and perform typechecking in parallel.
See loader.go comments for orientation.

This is what happens when you use start using Dmitry's new trace tool. :)

Tests:
- added test of cycles
- load/parse/typecheck of 'godoc' is ~2.5x faster
- race detector finds no errors.

Change-Id: Icb5712c7825002342baf471b216252cecd9149d6
Reviewed-on: https://go-review.googlesource.com/1582
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-14 16:10:20 +00:00