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>
- 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>
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>
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>
...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>
- 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>
Client + server support, and gomote flags.
Change-Id: I91320f47731f8c69b84c4961028bfbbdfc85467a
Reviewed-on: https://go-review.googlesource.com/3029
Reviewed-by: Andrew Gerrand <adg@golang.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>