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>
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>
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>
This allows godoc.org to link to the source code. I chose to link to
github.com instead of googlesource.com because their file browser is
better.
Details here:
864b1c0aba
Change-Id: I962b3fadc822e753245f52240937be5c7e158dc7
Reviewed-on: https://go-review.googlesource.com/2719
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This lets go vet produce useful results for syscall on darwin/amd64,
otherwise it gets caught on asm.s.
Change-Id: I3daa49cf61eeada52eb9d4e94e40c4d21d1d5b2d
Reviewed-on: https://go-review.googlesource.com/2741
Reviewed-by: Rob Pike <r@golang.org>
PackageCreated is a hook called when a types.Package
is created but before it has been populated.
The package's import Path() and Scope() are defined,
but not its Name() since no package declaration has
been seen yet.
Clients may use this to insert synthetic items into
the package scope, for example.
Change-Id: I210a0c4c766f03f715f03f26d5cd765f15f56e04
Reviewed-on: https://go-review.googlesource.com/2138
Reviewed-by: Alan Donovan <adonovan@google.com>
Actually parse the strings to check them more accurately.
The particular problem it missed was that it didn't check
for control characters in the key. The only valid separator
is a space.
More tests.
Fixes#9500
Change-Id: Ib547e11c7e8d47d81eb8b1e8f1ab9c26174933df
Reviewed-on: https://go-review.googlesource.com/2685
Reviewed-by: Russ Cox <rsc@golang.org>
Classic Go pitfall: "defer" in a loop does not do what you might expect.
+ test case
Fixes issue 9570
Fixes issue 9569
Change-Id: Iec05420872ef71190083a7192f76c92f54f4a2a1
Reviewed-on: https://go-review.googlesource.com/2655
Reviewed-by: Robert Griesemer <gri@golang.org>
Part of https://golang.org/s/go15bootstrap
This is one step in a series of CLs to make the dev.cc branch build
after https://golang.org/cl/2470 (which converted cmd/dist from C to
Go)
TBR to adg because subsequent changes to Dockerfiles depend on knowing
the commit hash of this one.
Change-Id: I26122e2446c345446bbbca0df601f50ea9383adb
Reviewed-on: https://go-review.googlesource.com/2651
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The parser was assuming it would find <body> or </head>.
If the entire response is just <meta> tags, it finds EOF and
treats that as an error. It's not.
This is the same change as in https://golang.org/cl/68520044.
Fixes#9556.
Change-Id: If51ed36e7364c15788311039caf8323eb5fe9a6c
Reviewed-on: https://go-review.googlesource.com/2650
Reviewed-by: Minux Ma <minux@golang.org>
... because it's not running all the tests.
Updates golang/go#9491
Change-Id: I2f3e8d1c2cba1b014d59cd3adfe5e04bd5f74dae
Reviewed-on: https://go-review.googlesource.com/2524
Reviewed-by: Andrew Gerrand <adg@golang.org>
This resulted in our first "ok" on the dashboard for Plan 9 with the
buildlet, in 19 minutes. It only runs the std tests, and nothing else
after that.
Update golang/go#9491
Change-Id: Iad77a594f83bfd3fa72596bcc3057645d9c9bb4c
Reviewed-on: https://go-review.googlesource.com/2523
Reviewed-by: Andrew Gerrand <adg@golang.org>
Also: Better position for error messages related to wrong use of ... .
Fixes#9473.
Change-Id: I90565f51a42897b7292f651a84a23611a5d8f359
Reviewed-on: https://go-review.googlesource.com/2390
Reviewed-by: Alan Donovan <adonovan@google.com>
This got lost before in my git stash stack.
Change-Id: Id73cdb89e73ab83c26971c6c1c4e0fc74d91018f
Reviewed-on: https://go-review.googlesource.com/2521
Reviewed-by: Andrew Gerrand <adg@golang.org>
Godoc documentation did not mention the feature for showing example code
runnable by the testing package. Add a link to the testing package.
Update golang/go#9471
Change-Id: Ic15794c59732e9b0b42c5b16c60be0a47c41afa5
Reviewed-on: https://go-review.googlesource.com/2490
Reviewed-by: Andrew Gerrand <adg@golang.org>
When cover is used with cgo packages, the coverage profile is produced
from the cgo-generated Go source files, so the profile will reference
line and column numbers from that generated source, even though it names
the original file.
This is okay in general because the cgo-generated Go source files are
very similar to the original, with one significant exception:
the original source may refer to C identifiers such as C.foo(), but the
cgo tool generates source that rewrites these mentions to something like
_Cfunc_foo.
This means that column numbers in coverage profiles might be higher than
they should be, so be lenient when interpreting them.
Update golang/go#9479
Change-Id: Ic3abef07471614101ce0c686d35b85e7e5e6a777
Reviewed-on: https://go-review.googlesource.com/2410
Reviewed-by: Rob Pike <r@golang.org>
Move the parser for benchmark output from cmd/benchcmp into its own
package, benchmark/parse.
The majority of the change is just moving code around. Instead of
implementing the '-best' flag in ParseBenchSet, it is now implemented in
its own function 'selectBest' in cmd/benchcmp.
Bench.Ord (the ordinal position of a Bench within a BenchSet) has been
exported.
Change-Id: Id27032a220f9ff2596117b58b86243998695a804
Reviewed-on: https://go-review.googlesource.com/2102
Reviewed-by: Rob Pike <r@golang.org>
This uses the new JSON interface to the build dashboard (from
golang.org/cl/2290) to find all work, and re-enables the OpenBSD
builder[*], and can do multiple things at a time. Andrew and I just
watched it fire up 8 OpenBSD VMs at once to catch up.
[*] The OpenBSD builder was disabled because it would only report
results for the main repo, not subrepos, and the old
build.golang.org/todo interface didn't understand that was
possible. Now the steps are considered separate.
Update golang/go#8642 (OpenBSD)
Update golang/go#9492 (builds in VMs)
Change-Id: Ic6c2f73ee3da218dd54ef1a33f3afc97046ea3cc
Reviewed-on: https://go-review.googlesource.com/2282
Reviewed-by: Andrew Gerrand <adg@golang.org>
Currently this is running an OpenBSD amd64 builder, but other operating
systems are now easy.
Updates golang/go#8642
Updates golang/go#9492
Change-Id: I4e1026c49ee4d253dfcf78c7606767294784f02e
Reviewed-on: https://go-review.googlesource.com/2264
Reviewed-by: Andrew Gerrand <adg@golang.org>
Currently the coordinator only handles Docker container builders. An
upcoming change will add VM builders, running VMs on GCE for OpenBSD,
Plan 9, Windows, etc.
This change refactors the handling of the coordinator's build status
in prep for VM builders. Notably, it doesn't call "docker logs"
directly to get logs. It now keeps them in memory instead. Because
they're then in memory, we might as well make it keep the details of
the last N builds too, which we kept wanting earlier.
Updates #9492
Change-Id: I6bae4a5854e7efa3f8a6186ec3670a43c98c4df2
Reviewed-on: https://go-review.googlesource.com/2262
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This isn't used yet, but will be for the new-style builders (VMs on
GCE running the buildlet, started by the coordinator).
From the code's comments:
cleanUpOldVMs periodically enumerates virtual machines and deletes
any which have a "delete-at" attribute having a unix timestamp
before the current time. These VMs are created to run a single
build and should be shut down by a controlling process. Due to
various types of failures, they might get stranded. To prevent them
from getting stranded and wasting resources forever, we instead set
the "delete-at" metadata attribute on them when created to some
time that's well beyond their expected lifetime, and then this is
the backup mechanism to delete them if they get away.
Update golang/go#8639
Update golang/go#8640
Update golang/go#8642
Change-Id: I489e97926e7ab56487571c2bf0bd255cdf49570d
Reviewed-on: https://go-review.googlesource.com/2199
Reviewed-by: Burcu Dogan <jbd@google.com>
The Go wiki has moved to GitHub. Update links to use a golang.org/wiki/... target.
Change-Id: Iff7e1b2add469318f5e467aed5d1f3e67155b283
Reviewed-on: https://go-review.googlesource.com/2250
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
It is sometimes useful for API clients to be able to disable the unused
import check, although for good reason this should not be exposed as part of
a user-facing interface. There are at least two use cases that I am aware of:
1) It allows for automated test case reduction tools such as delta or C-Reduce
to be more easily applied to type checker input. Disabling the check
makes it possible for the tool to identify and remove code that depends
on imported packages without any specific knowledge of Go, as the import
need not be removed simultaneously with the code.
2) Interactive tools (such as REPLs) that may have previously received a
list of imports and subsequently receive a line of code that may use any
number of these imports. It is simpler for such tools to import all the
packages in its list than to try to identify the correct set of imports.
Change-Id: I00091a4e5c8e1bd664efd82a636f255eaaa5a2db
Reviewed-on: https://go-review.googlesource.com/2136
Reviewed-by: Robert Griesemer <gri@golang.org>
The new interface makes the functions more useful by allowing clients to
check the various properties that TypeAndValue provides.
Change-Id: I8b41a27316081bea24a18ffe6fa1812e809d6f67
Reviewed-on: https://go-review.googlesource.com/2134
Reviewed-by: Robert Griesemer <gri@golang.org>