aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-10merge in studio-master-release history after reset to studio-master-devstudio-master-releaseThe Android Automerger
2015-03-05go/buildutil: use chan (not func) in the ForEachPackage APIHEADgradle_1.3.0-beta4gradle_1.3.0-beta3mastermainAlan Donovan
The callbacks are intentionally concurrent, making this function very easy to misuse (most clients so far have got it wrong, even my own). Using a channel in the API makes the concurrency obvious, the correct usage easy, and the client control flow simpler. Change-Id: Ied38c3ed5c98b40eb1b322a984ed9dc092ac0918 Reviewed-on: https://go-review.googlesource.com/3250 Reviewed-by: Sameer Ajmani <sameer@golang.org>
2015-03-05go/ssa: treat declared init functions less speciallyAlan Donovan
Before this change, declared init functions were not package members; this choice dates from when go/types did not create Func objects for them. Now, they have an Object. They appear in Members, keyed by "init#%d" (sequence number) for uniqueness. They can be enumerated. They can be looked up from a *types.Func via (*Program).FuncValue. Caveat: fn.Object.Name() no longer equals fn.Name() in all cases. NB: incompatible API change! (Your build will not break though.) Change-Id: I2de873079fd57329e6c2f55a282940f6699a77a1 Reviewed-on: https://go-review.googlesource.com/6950 Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Peter Collingbourne <pcc@google.com>
2015-03-02refactor/eg: use format.Node not printer.Fprint for canonical outputAlan Donovan
Fixes golang/go#10038 Change-Id: If3243f0c68fc0442dcc1e2dd71cbdc629beff70c Reviewed-on: https://go-review.googlesource.com/6481 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
2015-03-02go/types: better error message for use of _ in type switchRobert Griesemer
Change-Id: If690d2d9607b3632451df2681c293835321ed9bd Reviewed-on: https://go-review.googlesource.com/6413 Reviewed-by: Alan Donovan <adonovan@google.com>
2015-03-02godoc/static: fix variable reference in search.txtPéter Surányi
Change to match searchdoc.html which works. (Was referring to "$val.Idents" in line 26, but "$val" here is already an element of Idents.) Also clarify naming and comments for makestatic. Fixes golang/go#10022. Change-Id: Ia3f2fdadd5d10f31a1825e8db966b6e92da2b93e Reviewed-on: https://go-review.googlesource.com/6236 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-02-27go/loader: name unnamed packages so errors make senseAlan Donovan
Add tests for: - this naming - missing file in created package Change-Id: I07c66b66e845c52d4685509c362b34f1f0c92648 Reviewed-on: https://go-review.googlesource.com/6310 Reviewed-by: Robert Griesemer <gri@golang.org>
2015-02-25oracle: when 'implements' is invoked on a method, show related methods, not ↵Alan Donovan
types. Fixes #9972 Change-Id: I25b65a64dcc4d551be3db8566783a9d23d410a2e Reviewed-on: https://go-review.googlesource.com/5860 Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-02-23go/loader: rename SourceImports flag to ImportFromBinary and invert senseAlan Donovan
...since the zero value is more useful by far. This is a breaking API change, obviously. (One or two tests in this CL have intentional been left using the zero value, i.e., they now load source.) Change-Id: I42287bfcdb1afef8ee84e5eac12534dd0a1fd5d2 Reviewed-on: https://go-review.googlesource.com/5653 Reviewed-by: Robert Griesemer <gri@golang.org>
2015-02-23Fix broken buildAlan Donovan
Due to copy/paste from Google-internal branch. I can't explain why I didn't test this; sorry. Change-Id: I7b5f083a124c7cfb0fa6cb0506465a36bd79e983 Reviewed-on: https://go-review.googlesource.com/5654 Reviewed-by: Alan Donovan <adonovan@google.com>
2015-02-23cmd/vet: fix unnamed FP checkRuss Cox
While we're here, silence a print about failure to import fmt. When it prints, it looks like a problem, and in fact the result is never used in vet. Change-Id: I76121b335026a2b09637608b997517be94fd167c Reviewed-on: https://go-review.googlesource.com/5573 Reviewed-by: Rob Pike <r@golang.org>
2015-02-23cmd/oracle: check errors from Flush and Close.Alan Donovan
Change-Id: Ia3c61b37140a83769373b322de691362ac919a90 Reviewed-on: https://go-review.googlesource.com/5630 Reviewed-by: Robert Griesemer <gri@golang.org>
2015-02-23cmd/present: do not show help text on localhostJosh Bleecher Snyder
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-23cmd/present: Fixed printing of slides.Egon Elbre
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-20go/loader: define a FindPackage hook for build systems not compatible with ↵Alan Donovan
"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-20go/ssa: minor doc tweaks.Alan Donovan
Change-Id: I116405d5014e4f2bccfff91e01945e10feacf9ee Reviewed-on: https://go-review.googlesource.com/5442 Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-02-18doc: add CONTRIBUTING.mdAndrew Gerrand
Change-Id: I121e02f941c4996d4ea44b699f2e10259bc0a665 Reviewed-on: https://go-review.googlesource.com/5219 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-02-18go/ssa: standardize parsing of BuilderMode flags.Alan Donovan
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-17cmd/vet: add color.CMYK to the whitelist of frozen structs.Nigel Tao
Change-Id: I5164ef9a998a0807f80668b9140eac4b2f889049 Reviewed-on: https://go-review.googlesource.com/4997 Reviewed-by: David Symonds <dsymonds@golang.org>
2015-02-14cmd/present: show navigational help text on page loadAndrew Gerrand
Change-Id: I35e7cbec56a0617540316f0205c5a92e7532c491 Reviewed-on: https://go-review.googlesource.com/4910 Reviewed-by: Minux Ma <minux@golang.org>
2015-02-12go/gccgoimporter: disable test case (fix build, at least partially)Robert Griesemer
Change-Id: I021c4b4525006d27dd63f6eee16a5d219f6ba9dc Reviewed-on: https://go-review.googlesource.com/4750 Reviewed-by: Alan Donovan <adonovan@google.com>
2015-02-11cmd/gomvpkg: fix import rewrites for top-level moved packageMichael Matloob
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-10cmd/godoc: add golang.org/x/tour meta redirectAndrew Gerrand
Change-Id: I2b855bb166612af391bb99742f6b6d58bc3ec226 Reviewed-on: https://go-review.googlesource.com/4340 Reviewed-by: David Symonds <dsymonds@golang.org>
2015-02-09cmd/callgraph: fix careless quoting bugAlan Donovan
Change-Id: I809a2ea711bb1a516dfcf8abf5e4d26061b4daf0 Reviewed-on: https://go-review.googlesource.com/4230 Reviewed-by: Sameer Ajmani <sameer@golang.org>
2015-02-06go/types: don't permit implicit assignments to unexported struct fields via ↵Robert Griesemer
literals Change-Id: I74eec172ba5a319f91c95e33b047f489dfce0c95 Reviewed-on: https://go-review.googlesource.com/4090 Reviewed-by: Alan Donovan <adonovan@google.com>
2015-02-06cmd/vet: allow spaces in struct tag values.Nigel Tao
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-04cmd/vet: warn about zero arg index in print formatJoël Stemmer
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-02go/loader: improve robustness in face of input errorsAlan Donovan
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-02benchmark/parse: fix cosmetic defect in error str.Matt T. Proud
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-01-29go/types: update testdata (fix build)Robert Griesemer
Change-Id: Ifd38444c7c22f65f6e85fe6233b01703d1d14b4f Reviewed-on: https://go-review.googlesource.com/3540 Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-24cmd/tipgodoc: set GOROOT_BOOTSTRAP environment variableAndrew Gerrand
Change-Id: I7d5dc5f7510641d2976f2ea6acf0d52cb10b94e8 Reviewed-on: https://go-review.googlesource.com/3266 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-23refactor/rename: clarify usage messageAlan Donovan
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-23Extend duplicate check to exported wrappersAlan Donovan
Change-Id: I892fca0a374476aa9e65bf26fb03b73d6a0ae75a Reviewed-on: https://go-review.googlesource.com/1583 Reviewed-by: Robert Griesemer <gri@golang.org>
2015-01-23refactor/rename: make tests pass on windows (fixes build)Alex Brainman
- 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-22go/ssa: add list-of-tests constant to generated testmain packageAlan Donovan
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-22go/ssa: simplify TypesWithMethodSetsAlan Donovan
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-21go/ssa: change import path of synthetic test package to "test$main"Alan Donovan
...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-21go/types: expose IsInterface predicate, eliminating 6 copiesAlan Donovan
Change-Id: I3704d7bd7a11f691c66556c1b77ef79a503d2fe9 Reviewed-on: https://go-review.googlesource.com/2173 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-21cmd/godoc: add golang.org/x/build to go-import redirect listAndrew Gerrand
Change-Id: Id372b2da716b31bc016855d2d7f783fd1764e5c0 Reviewed-on: https://go-review.googlesource.com/3110 Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-21dashboard: delete after move to the golang.org/x/build repositoryAndrew Gerrand
Change-Id: I04335eb643d342fa7de1f39fc3fc26b1543a60e1 Reviewed-on: https://go-review.googlesource.com/3078 Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-21dashboard: buildlet client, server, and gomote enhancementsBrad Fitzpatrick
- 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-20refactor/rename: allow passing -force flag from EmacsDominik Honnef
Change-Id: Iac9355bc8a98cf61cb3d4ff871723ce466d38531 Reviewed-on: https://go-review.googlesource.com/2912 Reviewed-by: Alan Donovan <adonovan@google.com>
2015-01-20dashboard/cmd/buildlet: support for writing files from tgz URL directlyBrad Fitzpatrick
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-20dashboard: start of cmd/gomote buildlet client, more packificationBrad Fitzpatrick
Change-Id: I874f4f5ef253cf7f1d6d5073d7c81e76fa1de863 Reviewed-on: https://go-review.googlesource.com/2981 Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-16dashboard: move buildlet exec code from coordinator to client packageBrad Fitzpatrick
Change-Id: I778ac78ed02be9f67436ec045a3816dfc24afda3 Reviewed-on: https://go-review.googlesource.com/2923 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-16dashboard: create buildlet client package, move coordinator code into itBrad Fitzpatrick
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-16present: fix References link of talks.golang.orgJongmin Kim
Change-Id: I797a745dc891483217b732e9bf5413539f8c417e Reviewed-on: https://go-review.googlesource.com/2954 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-15cmd/stringer: fix ignored error in TestEndToEnd.Nigel Tao
Change-Id: Ia139e9da37aecddebe8895c0d3427d7e97d408f8 Reviewed-on: https://go-review.googlesource.com/2931 Reviewed-by: David Symonds <dsymonds@golang.org>
2015-01-15go/buildutil: FakeContext: create build.Context of fake file tree, for testingAlan Donovan
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-15dashboard: move builder configuration out of coordinator into a packageBrad Fitzpatrick
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>