1
0
mirror of https://github.com/golang/go synced 2024-11-12 00:20:22 -07:00
Commit Graph

40550 Commits

Author SHA1 Message Date
Andrew
cb0f0d6cf1 doc/go1.13: add release notes for the net package
Change-Id: I54dc8afc33d6f8946d2c79b0339118fa3710a688
Reviewed-on: https://go-review.googlesource.com/c/go/+/182618
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-18 19:30:06 +00:00
Austin Clements
bd7d1bb8f3 doc/go1.13: runtime release notes, some compiler release notes
Change-Id: Icc5083a3de0c6b737bfc20b573ed785651910148
Reviewed-on: https://go-review.googlesource.com/c/go/+/182461
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-18 16:36:41 +00:00
Josh Bleecher Snyder
52572afa20 reflect,doc: use "the" instead of "a" in IsZero docs
There is a subtle distinction between a value
*being* the zero value vs being *equal to* the zero value.
This was discussed at length in #31450.

Using "a zero value" in the docs suggests that there may
be more than zero value. That is possible on the "equal to
zero value" reading, but not the "is zero" reading that we
selected for the semantics of IsZero.

This change attempts to prevent any confusion on this front by
switching to "the zero value" in the documentation.

And while we're here, eliminate a double-space.
(Darn macbook keyboards.)

Change-Id: Iaa02ba297438793f5a90be9919a4d53baef92f8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/182617
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-18 15:08:08 +00:00
Steve Mynott
bc27b64dba doc: remove a Google+ link since it doesn't exist anymore
Change-Id: I692229a5597a6114a7f4261f7b59c58bf20f3e2b
GitHub-Last-Rev: ab173354ca
GitHub-Pull-Request: golang/go#32660
Reviewed-on: https://go-review.googlesource.com/c/go/+/182677
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-18 03:41:59 +00:00
Jay Conrod
53f628e560 cmd/go/internal/modload: query correct "latest" version through proxy
This fixes a regression introduced in CL 180337. When we query a
module at "latest" that has no tagged versions, we tried to use ""
as the version because we used info.Name instead of info.Version. This
only happened when using a proxy: in direct mode, info.Name is set to
the underlying VCS revision, which is fine.

Also: serve "/mod/path/@latest" through our test proxy.
Previously, we served a 404, which made this bug hard to detect.

Fixes #32636

Change-Id: I5c60975656297f862cad66675170e819685ebd39
Reviewed-on: https://go-review.googlesource.com/c/go/+/182697
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-18 00:18:19 +00:00
Andrew Gerrand
263db9b680 html/template, text/template: document glob semantics
This change updates the doc comments of the various ParseGlob functions
and methods to state that they use the semantics of filepath.Match when
matching the file name pattern.

Fixes #30608

Change-Id: Iee4bdc0a2a2f8647d1f9a910e4d72a5de9204d11
Reviewed-on: https://go-review.googlesource.com/c/go/+/179739
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-06-17 21:53:49 +00:00
Keith Randall
2f387ac1f3 doc: update 1.13 release notes
Write release notes for a few reflect, runtime, and syscall changes.

The init randomization has been reverted.

Change-Id: Idae481ca015e325eb7302abaa15b2792312f4c32
Reviewed-on: https://go-review.googlesource.com/c/go/+/181577
Reviewed-by: Austin Clements <austin@google.com>
2019-06-17 21:18:44 +00:00
Samuel Tan
db042d2d42 html/template: handle nil Error values in context.String
Add a special case to print a generic nil error when context.err is
nil.

Previously, this case was unchecked, leading to a call to (*Error).Error
with a nil receiver, which was triggering a nil pointer access. However,
this bug was masked by the panic-recovery code in package fmt.

I tested this change by running `dlv test` in src/html/template, running
the `continue` command, and verifying that no "bad access" errors are
returned.

Fixes #28854

Change-Id: I0b637b943de003d9efc294f6f1e49b793668d037
Reviewed-on: https://go-review.googlesource.com/c/go/+/181579
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-06-17 19:12:05 +00:00
Jay Conrod
530097fe60 cmd/go: document GOBIN and 'go install' locations
* In doc/install-source.html, clarify the meaning of $GOBIN and
  describe where executables from the Go distribution are
  installed. Also describe $GOPATH, since it provides a default value
  for $GOBIN and may conflict with $GOROOT.
* Add more detail to 'go help install' as well.

Fixes #31576

Change-Id: Ib8a8c21677c3aa0ebef97a3b587b6f8fe338b80e
Reviewed-on: https://go-review.googlesource.com/c/go/+/182341
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-17 17:28:00 +00:00
Elias Naur
7a4d02387f syscall: accept permission errors in TestExecPtrace
Fixes the test on the linux-arm64-packet builder.

Change-Id: Icaf9edf9542f4f6e3791ca43298a1e7051eaa576
Reviewed-on: https://go-review.googlesource.com/c/go/+/182378
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-16 20:04:54 +00:00
Elias Naur
06e34e5815 syscall: disable ptrace on iOS
It is forbidden by App Store.

Fixes #31628

Change-Id: Ie6d14a524ee55b57af8db685f3a79f474733add5
Reviewed-on: https://go-review.googlesource.com/c/go/+/182297
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2019-06-15 14:23:04 +00:00
Elias Naur
8eec3fe830 misc/ios: add missing CGO_ENABLED=1 for running standalone tests
Change-Id: Icfd5b9d1ca757081af7885189ae7094fa1b3d8f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/182377
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-15 06:19:57 +00:00
Ian Lance Taylor
85d56c3096 runtime: use dispatch semaphores on Darwin
Changes Darwin semaphore support from using pthread mutexes and
condition variables to using dispatch semaphores. Signaling a dispatch
semaphore is async-signal-safe.

Fixes #31264

Change-Id: If0ce47623501db13e3804b14ace5f4d8eaef461e
Reviewed-on: https://go-review.googlesource.com/c/go/+/182258
Reviewed-by: Elias Naur <mail@eliasnaur.com>
Reviewed-by: Keith Randall <khr@golang.org>
2019-06-15 05:36:45 +00:00
Katie Hockman
f18aeb3a54 doc: release notes for syscall and syscall/js
Change-Id: I0ee4b4f0211cd12803ab33976669350d9dd615f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/181944
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-14 19:37:52 +00:00
Julie
9838f4dfb4 doc: add release notes for log
Change-Id: Ifd330053094c172b7dcd9086da173289efc7f9b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/181942
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-14 18:41:07 +00:00
Jay Conrod
4c2ffd26ec cmd/go: avoid accidental downgrades in 'go get' with latest and patch
Currently, 'go get -u' and 'go get -u=patch' avoid accidentally
downgrading modules by preventing upgrades in two cases:

1) If the current version is a prerelease that is semantically later
   than the "latest" or "patch" version.
2) If the current version is a pseudoversion that is chronologically
   newer than the "latest" or "patch" version.

With this change, 'go get m@latest' and 'go get m@patch' prevent
downgrades using the same checks.

Also: 'go get m@patch' now works if m is a module path but not a
package path (i.e., there is no package in the module root directory).

Fixes #30634
Fixes #32537

Change-Id: I916630c385b5f3ba7c13e0d65ba08f73a1a67829
Reviewed-on: https://go-review.googlesource.com/c/go/+/180337
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-14 18:01:34 +00:00
Julie
80f89133ea doc: add release notes for context
Change-Id: I4c52d9bcf941810dbdfdd39e7f339c8283d6bcc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/181937
Reviewed-by: Katie Hockman <katie@golang.org>
2019-06-14 16:46:12 +00:00
Lynn Boger
6a9b22ce9d vendor: go get -u golang.org/x/crypto && go mod vendor
Pick up asm ppc64le implementations for internal/chacha20 and
poly1305.

Change-Id: Ide6fc91da3b10d1c3d9e8e00957c52be06a3cf93
Reviewed-on: https://go-review.googlesource.com/c/go/+/181877
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
2019-06-13 17:44:27 +00:00
Katie Hockman
f83c44e031 doc: clarify default go command behavior in the release notes
Change-Id: I2a0bd295ad9737581d149a7165191b878ae2acda
Reviewed-on: https://go-review.googlesource.com/c/go/+/181880
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 17:12:09 +00:00
Daniel Theophanes
683ffe09f6 database/sql: add support for decimal interface
Add support for scanning decimal types into values. If the dest
supports the decimal composer interface and the src supports
the decimal decomposer, set the value of the decimal when Scanning.

Add support for sending decimal decomposer interface values
as parameters.

For #30870

Change-Id: Ic5dbf9069df8d56405852b17542a9188d55c2947
Reviewed-on: https://go-review.googlesource.com/c/go/+/174181
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 16:59:01 +00:00
Daniel Theophanes
dc63b59630 database/sql: add Conn.Raw to expose the driver Conn safely
Exposing the underlying driver conn will allow the use of the
standard connection pool while still able to run special function
directly on the driver.

Fixes #29835

Change-Id: Ib6d3b9535e730f008916805ae3bf76e4494c88f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/174182
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 16:49:52 +00:00
Bryan C. Mills
25a2b98f7a cmd/go: factor the I/O-retry logic out of renameio
Factor the try-on-failure variants are now in the package
cmd/go/internal/robustio.

Add to them a RemoveAll variant using the same retry loop,
and use it to attempt to address the observed flakes in
TestLinkXImportPathEscape.

Fixes #19491
Updates #25965
Updates #28387
Updates #32188

Change-Id: I9db1a0c7537b8aaadccab1b9eca734595668ba29
Reviewed-on: https://go-review.googlesource.com/c/go/+/181541
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2019-06-13 15:09:42 +00:00
Jay Conrod
55d31e16c1 cmd/go: add '--' before repository names when invoking vcs tools
Also, in 'go get' in GOPATH mode, report an error for package paths
that start with '-'.

Change-Id: Ic2575381aa2d093ba15c53b893bf2eaded8b6066
Reviewed-on: https://go-review.googlesource.com/c/go/+/181237
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-13 14:14:02 +00:00
Julie
b388d6868f doc: add release notes for reflect
Change-Id: I71a6816f54f8ad0f8531bb3f9de552fd136a0ed4
Reviewed-on: https://go-review.googlesource.com/c/go/+/181943
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 03:58:18 +00:00
Julie
418c7d8174 doc: release notes for html/template
Change-Id: Ifdc3c5b840e6833f14c8e52948e45d5faa5a0615
Reviewed-on: https://go-review.googlesource.com/c/go/+/181940
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 03:58:11 +00:00
Daniel Theophanes
73abea300a database/sql/driver: document Valuer must not panic
While it is possible for the connection pool to guard against panics
on every valuer read, this seems like a high cost to be added,
in both code complexity and possible runtime performance.

Most uses of the Valuer will be trivial, like returning
a struct field. Optimize for that case. If sometime may panic the
valuer should itself use recover and return an error.

Fixes #26332

Change-Id: Iad18780b8028f669f5a7841b74a5384d62fb6a7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/170700
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 02:49:03 +00:00
Dmitri Shuralyov
0b6e3bf4ec doc: mention os.UserConfigDir in release notes
This change makes the release notes for Go 1.13 more complete
by mentioning a new function in the os package.

Change-Id: I0d637fd70ff6d14782bbfb7c13985a0f83b19d6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/181945
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 01:26:12 +00:00
Katie Hockman
c0c6cee6aa doc: release notes for text/scanner and text/template
Change-Id: Ib5417cc48959b03befb1579da3281415a11ede9f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181879
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-06-12 22:17:38 +00:00
Russ Cox
82cf8bca9c cmd/go: add GOPRIVATE environment variable
It is too confusing to have to set GONOSUMDB and GONOPROXY
in common use cases, but one cannot be guaranteed to be a
subset of the other.

This CL adds GOPRIVATE, which takes the same kind of pattern list
but is defined as "these patterns are private (non-public) modules".
Today the implication is that GOPRIVATE is the default setting for
GONOSUMDB and GONOPROXY. If there are other accommodations
to make for private packages in the future or in other tools,
having this clear statement of intent will let us do that.
(For example maybe an IDE integration would hyperlink an import
path to godoc.org; consulting GOPRIVATE would be a reasonable
way to decide not to do that for certain imports. In contrast,
consulting GONOPROXY or GONOSUMDB clearly would not.)

Fixes #32184.

Change-Id: If54c12d353c7a0a5c0e0273764140cce3c154a02
Reviewed-on: https://go-review.googlesource.com/c/go/+/181719
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-06-12 18:49:43 +00:00
Matthew Dempsky
f44404ebbf cmd/compile: fix range analysis of small signed integers
For int8, int16, and int32, comparing their unsigned value to MaxInt64
to determine non-negativity doesn't make sense, because they have
negative values whose unsigned representation is smaller than that.
Fix is simply to compare with the appropriate upper bound based on the
value type's size.

Fixes #32560.

Change-Id: Ie7afad7a56af92bd890ba5ff33c86d1df06cfd9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/181797
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-06-12 18:03:46 +00:00
Julie
87367cf86a doc: add release notes for database/sql
Change-Id: I032a3342c3ac899a39d357420b981b6f281518f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/181939
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
2019-06-12 17:46:55 +00:00
Katie Hockman
6a4b1f745d doc: add release notes for sync
Change-Id: I49b09349a632a6b6219c85638d9cb6774c0c210a
Reviewed-on: https://go-review.googlesource.com/c/go/+/181721
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-12 17:10:31 +00:00
Andrew Bonventre
65f53da8e8 doc: add release notes for the bytes, strings, and time packages
Change-Id: Idb5bf2a61bff635e3ebd926bdeacf943578ac874
Reviewed-on: https://go-review.googlesource.com/c/go/+/181681
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-12 14:58:18 +00:00
Jonathan Amsterdam
0c2953e4cb cmd/go: include -errorsas in go test vet checks
Make "go test" run the new errorsas vet check by default.

Fixes #31213.

Change-Id: I5c93c000874ffe1c0b6d647bf10de803f414c5c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/179977
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2019-06-12 13:56:48 +00:00
Jonathan Amsterdam
f2a4c139c1 errors: clarify doc for As
Change-Id: I389d140e8fd2849e4dc438246add47819f6b25a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/181300
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-11 21:50:05 +00:00
Bryan C. Mills
bdd4201552 cmd/go: allow GOPROXY to elide the "https://" prefix
Fixes #32191

Change-Id: I6eebe1d4975e904c906e6b839cd6cab9447cbb34
Reviewed-on: https://go-review.googlesource.com/c/go/+/181019
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2019-06-11 19:43:04 +00:00
Katie Hockman
d36452eb56 doc: add release notes describing the default mirror and sumdb
Change-Id: I4923f0726ae0261a7c7b0f85e7433ae0f605c123
Reviewed-on: https://go-review.googlesource.com/c/go/+/181738
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-11 19:25:20 +00:00
Bryan C. Mills
9f765667d6 cmd/vet: include the errors.As check from upstream x/tools
This change revendors golang.org/x/tools to include the check and
modifies cmd/vet to add it to the command.

CL 179977 will enable the check by default for 'go test'.

Commands run (starting in GOROOT/src):
	cd cmd
	emacs vet/main.go
	go get -u=patch golang.org/x/tools/go/analysis/passes/errorsas@latest
	go mod tidy
	go mod vendor
	cd ..
	./make.bash
	go test all

Updates #31213

Change-Id: Ic2ba9bd2d31c4c5fd9e7c42ca14e8dc38520c93b
Reviewed-on: https://go-review.googlesource.com/c/go/+/181717
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2019-06-11 17:54:27 +00:00
Jonathan Amsterdam
34a43d7c1d errors: improve As tests
Check the value of target after As returns true.

Change-Id: I76a2b25fe825ee1dbb5f39f8f0b211c55bd25a4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181299
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-11 17:48:48 +00:00
Andrew Bonventre
5f94d44722 doc: add release notes for os and os/exec
Change-Id: I34fd45ee252474c12f2e9c8d9b1a75b9eabb57f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/181549
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-11 17:29:22 +00:00
Dmitri Shuralyov
ef84fa082c doc: document Go 1.12.6
Change-Id: I8ae00d2392c20c627d58cf7e79015e982b971802
Reviewed-on: https://go-review.googlesource.com/c/go/+/181551
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-06-10 23:23:39 +00:00
Dmitri Shuralyov
5545301697 doc: document Go 1.11.11
Change-Id: I1c3e3305dfee4545a6caedd48243770ab3b28277
Reviewed-on: https://go-review.googlesource.com/c/go/+/181550
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-06-10 23:21:57 +00:00
Bryan C. Mills
bff0ae6a01 cmd/go: in TestScript, set $GOEXE instead of $exe
$GOEXE exists and is documented in 'go env', so $exe is redundant and
a bit confusing. Notably, mod_modinfo.txt already assumes that GOEXE
is set (even though it isn't), and thus fails on Windows.

After this CL, `go test cmd/go/...` passes on a windows-amd64-2016
builder. However, given that the $PATH on the builder is very minimal
(#32430) and network access is limited, tests that rely on binaries
(such as 'git') or external networking may still be broken.

Updates #25300

Change-Id: I9d80f2a0fbaa8bc35fa2205b6898aeccecda4e94
Reviewed-on: https://go-review.googlesource.com/c/go/+/181542
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-10 21:00:48 +00:00
Andrew Bonventre
5ce1819cca doc, net/http: add release notes for net/http and fix doc comments
Change-Id: I684e3522e387b2d96d5cfb2878d2f77bf4558443
Reviewed-on: https://go-review.googlesource.com/c/go/+/181545
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-10 20:32:36 +00:00
Bryan C. Mills
39f7561e1b cmd/go/internal/load: remove unused hasSubdir function
No references to this function remain; remove it to avoid confusion
and reduce build overhead.

The last reference was removed in CL 167748.

Change-Id: I9d023c5d8904800edd3898fed79aa9f824dfb46a
Reviewed-on: https://go-review.googlesource.com/c/go/+/181548
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-06-10 20:32:02 +00:00
Keith Randall
2d75c332cc syscall: fix freebsd 64-bit test
64 bits is 8 bytes. Duh.

Change-Id: I991b359df6241889bdef13152f551af9db6e14c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/181557
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-06-10 20:03:20 +00:00
Bryan C. Mills
350f71f4cb cmd/go: in tests, don't assume that the 'git' binary is present
Add a helper-function to testenv to make these skips more ergonomic.
Also update a few existing skips in cmd/go/... to use it.

Updates #25300

Change-Id: I4205b4fb2b685dfac1cff3c999f954bff7b0f3c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/181538
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-10 17:04:55 +00:00
Keith Randall
8f296f59de Revert "Revert "cmd/compile,runtime: allocate defer records on the stack""
This reverts CL 180761

Reason for revert: Reinstate the stack-allocated defer CL.

There was nothing wrong with the CL proper, but stack allocation of defers exposed two other issues.

Issue #32477: Fix has been submitted as CL 181258.
Issue #32498: Possible fix is CL 181377 (not submitted yet).

Change-Id: I32b3365d5026600069291b068bbba6cb15295eb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/181378
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-10 16:19:39 +00:00
Keith Randall
daf944a531 syscall: fix Getdirentries on 32-bit freebsd 12
On freebsd 12, the system call for getdirentries writes 64 bits to
*basep, even on 32-bit systems. Accomodate that by providing a uint64
to the system call and copy the base to/from that uint64.
The uint64 seems to be a virtual file offset, so failing if the high
bits are not zero should be fine for reasonable-sized directories.

Fixes #32498

Change-Id: Ie22c0d301c6091bd20e813432928b24ab95cc314
Reviewed-on: https://go-review.googlesource.com/c/go/+/181377
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-10 16:18:32 +00:00
Bryan C. Mills
ec3ebf7bc3 cmd/go/internal/web: support file:// URLs
Fixes #27698
Fixes #32227

Change-Id: I2416408b3de2f9f1ae1af2911cc327a65d2c0170
Reviewed-on: https://go-review.googlesource.com/c/go/+/181037
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-06-10 13:43:51 +00:00