Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 1ee051bb32 all: clean up obsolete +build lines and io/ioutil uses [generated]
The module go directive is at 1.20, so modernize it a bit by
applying changes generated by the script below with go1.21.1.

[git-generate]
go fix ./...
gofmt -r 'ioutil.Discard -> io.Discard' -w .
gofmt -r 'ioutil.NopCloser -> io.NopCloser' -w .
gofmt -r 'ioutil.ReadAll -> io.ReadAll' -w .
gofmt -r '"ioutil.ReadAll: %v" -> "io.ReadAll: %v"' -w .
gofmt -r 'ioutil.ReadDir -> os.ReadDir' -w .
gofmt -r 'ioutil.ReadFile -> os.ReadFile' -w .
gofmt -r 'ioutil.TempDir -> os.MkdirTemp' -w .
gofmt -r 'ioutil.TempFile -> os.CreateTemp' -w .
gofmt -r 'ioutil.WriteFile -> os.WriteFile' -w .
goimports -w .

Change-Id: I145b27756e7c6101e992747ee822e7237df4cb91
Reviewed-on: https://go-review.googlesource.com/c/build/+/527016
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-09-08 21:45:36 +00:00
Dmitri Shuralyov 7bf60f09df all: make copyright headers consistent
Replace "Go Authors" with "The Go Authors." to be consistent with the
standard copyright header at https://go.dev/doc/contribute#copyright.
There were also a couple instances of a double space and double "the".

Change-Id: Ife7a80dd40f1a760ba85cbfee270356d46cfc53f
Reviewed-on: https://go-review.googlesource.com/c/build/+/472376
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2023-03-01 01:31:01 +00:00
Oleksandr Redko 47c00be222 all: change golang.org/x/net/context to context
Run commands:
- go tool fix -r context .
- goimports .

Change-Id: I231da3b8de36a0362f5988df7b00bb4bfec6d58a
Reviewed-on: https://go-review.googlesource.com/c/build/+/468015
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
2023-02-15 22:02:43 +00:00
Russ Cox 749806b5bf internal/diff: copy from main repo
This avoids needing to execute a subprocess for diff,
and it gives more control over the header, so that the
output can say `diff want have`.

Update the tests using the old internal/diff for the new API.

Ran go get golang.org/x/tools@latest && go mod tidy
to add the x/tools dependency for the test's use of txtar.
Looks like x/tools was already in the indirect dep graph at v0.1.12,
but pruned modules graphs meant that its dependencies
hadn't propagated up, so leaving it at v0.1.12 would have
caused other deps changes too (like moving goldmark up to v1.4.13).
It seemed clearer, if we will get churn either way, to bump
x/tools to its most recent tag.

Change-Id: Iabfb692c7916a6bde316d5caf81de052f147e54e
Reviewed-on: https://go-review.googlesource.com/c/build/+/432398
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-11-09 13:43:21 +00:00
Carlos Amedee e8c8ca12ab all: add license headers
This change adds license headers to files which are missing them.
A modified version of the addlicense tool was used to add these headers:
https://github.com/google/addlicense

The command issued was:
addlicense -c "Go Authors" -l bsd *

Change-Id: Id6fd17c587f99b3ff0ef5f5f35befcfe5aaeef72
Reviewed-on: https://go-review.googlesource.com/c/build/+/409614
Run-TryBot: Carlos Amedee <carlos@golang.org>
Auto-Submit: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2022-06-01 18:19:15 +00:00
Russ Cox 993f2c6f22 all: gofmt
Gofmt to update doc comments to the new formatting.

For golang/go#51082.

Change-Id: Ie063c2fd890641b551c0f304fee5fa19121f1b38
Reviewed-on: https://go-review.googlesource.com/c/build/+/399555
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-04-12 02:01:23 +00:00
Michael Pratt 852e1a2874 all: gofmt
go fmt the entire repo with Go 1.18 go fmt.

Change-Id: I9b9c77796d67dce6de9ceb154dd88058b9b8200f
Reviewed-on: https://go-review.googlesource.com/c/build/+/399039
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-08 16:52:56 +00:00
Michael Anthony Knyszek 1c089c8c90 perfdata: make a client query just return a reader
This is more general, and makes it easy to use different benchfmt
implementations.

For golang/go#48803.

Change-Id: I51f28554c5490e311b662b3fd936fd75c40ccce1
Reviewed-on: https://go-review.googlesource.com/c/build/+/395176
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-25 14:56:43 +00:00
Michael Anthony Knyszek fc96089fad perf,perfdata: copy perf[data].golang.org code from x/perf
This change re-homes the code for perf.golang.org and
perfdata.golang.org (available in x/perf/analysis and x/perf/storage
respectively) to x/build to avoid any issues with backwards
compatibility. We're much more lax about the Go 1 compatibility promise
in x/build than in other x/ repos (except maybe x/exp) so we can make
bigger changes. Also, we may re-home these services to live closer to
the rest of the build infrastructure, so co-locating the code also makes
sense.

The code was taken from golang.org/x/perf (or go.googlesource.com/perf)
at git hash 64dc439b20aef7259bd73a5452063060adb8d898, or CL 392658.

In order to make this work, we also copy the internal diff and basedir
packages from x/perf.

There are a few things these depend on that we have to leave behind. One
is x/perf/benchstat, which means we also leave behind
x/perf/storage/benchfmt, which it depends on. Both are OK because they
have new and shiny replacements that we'd rather use anyway.

This change also involved running a bunch of sed commands to update
package import paths as well as comments. The full diff is included in
the commit for review, but will be removed before landing.

For golang/go#48803.

Change-Id: Ib15840c15254bc8bfa266bbc82e1df7cf4c252db
Reviewed-on: https://go-review.googlesource.com/c/build/+/395175
Reviewed-by: Michael Pratt <mpratt@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-03-24 21:33:20 +00:00