Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream release-branch.go1.17 into microsoft/release-branch.go1.17 #184

Merged
merged 16 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 135 additions & 1 deletion CONTRIBUTORS

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go1.17
3 changes: 2 additions & 1 deletion codereview.cfg
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
branch: master
branch: release-branch.go1.17
parent-branch: master
33 changes: 21 additions & 12 deletions doc/go1.17.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
main ul li { margin: 0.5em 0; }
</style>

<h2 id="introduction">DRAFT RELEASE NOTES — Introduction to Go 1.17</h2>
<h2 id="introduction">Introduction to Go 1.17</h2>

<p>
<strong>
Go 1.17 is not yet released. These are work-in-progress
release notes. Go 1.17 is expected to be released in August 2021.
</strong>
The latest Go release, version 1.17, arrives six months after <a href="/doc/go1.16">Go 1.16</a>.
Most of its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 <a href="/doc/go1compat">promise of compatibility</a>.
We expect almost all Go programs to continue to compile and run as before.
</p>

<h2 id="language">Changes to the language</h2>
Expand Down Expand Up @@ -488,6 +488,15 @@ <h2 id="compiler">Compiler</h2>
and compare functions by code pointer.
</p>

<h3 id="link">Linker</h3>

<p><!-- CL 310349 -->
When the linker uses external linking mode, which is the default
when linking a program that uses cgo, and the linker is invoked
with a <code>-I</code> option, the option will now be passed to the
external linker as a <code>-Wl,--dynamic-linker</code> option.
</p>

<h2 id="library">Core library</h2>

<h3 id="runtime/cgo"><a href="/pkg/runtime/cgo">Cgo</a></h3>
Expand Down Expand Up @@ -744,9 +753,9 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>

<p><!-- CL 311572 -->
The new
<a href="/pkg/database/sql/#NullInt16"><code>NullInt16</code></a>
and
<a href="/pkg/database/sql/#NullByte"><code>NullByte</code></a>
<a href="/pkg/database/sql/#NullInt16"><code>NullInt16</code></a>
and
<a href="/pkg/database/sql/#NullByte"><code>NullByte</code></a>
structs represent the int16 and byte values that may be null. These can be used as
destinations of the <a href="/pkg/database/sql/#Scan"><code>Scan</code></a> method,
similar to NullString.
Expand Down Expand Up @@ -1196,11 +1205,11 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>

<p><!-- CL 300996 -->
The package now accepts comma "," as a separator for fractional seconds when parsing and formatting time.
The following time formats are now accepted:
For example, the following time layouts are now accepted:
<ul>
<li>2006-01-02 14:06:03,999999999 -0700 MST</li>
<li>Mon Jan _2 14:06:03,120007 2006</li>
<li>Mon Jan 2 14:06:03,120007 2006</li>
<li>2006-01-02 15:04:05,999999999 -0700 MST</li>
<li>Mon Jan _2 15:04:05,000000 2006</li>
<li>Monday, January 2 15:04:05,000 2006</li>
</ul>
</p>

Expand Down
7 changes: 6 additions & 1 deletion src/cmd/dist/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1263,14 +1263,19 @@ func cmdbootstrap() {
timelog("start", "dist bootstrap")
defer timelog("end", "dist bootstrap")

var noBanner bool
var noBanner, noClean bool
var debug bool
flag.BoolVar(&rebuildall, "a", rebuildall, "rebuild all")
flag.BoolVar(&debug, "d", debug, "enable debugging of bootstrap process")
flag.BoolVar(&noBanner, "no-banner", noBanner, "do not print banner")
flag.BoolVar(&noClean, "no-clean", noClean, "print deprecation warning")

xflagparse(0)

if noClean {
xprintf("warning: --no-clean is deprecated and has no effect; use 'go install std cmd' instead\n")
}

// Set GOPATH to an internal directory. We shouldn't actually
// need to store files here, since the toolchain won't
// depend on modules outside of vendor directories, but if
Expand Down
8 changes: 1 addition & 7 deletions src/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,10 @@ if [ "$1" = "--dist-tool" ]; then
exit 0
fi

buildall="-a"
if [ "$1" = "--no-clean" ]; then
buildall=""
shift
fi

# Run dist bootstrap to complete make.bash.
# Bootstrap installs a proper cmd/dist, built with the new toolchain.
# Throw ours, built with Go 1.4, away after bootstrap.
./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
rm -f ./cmd/dist/dist

# DO NOT ADD ANY NEW CODE HERE.
Expand Down
20 changes: 10 additions & 10 deletions src/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,20 @@ if x%2==x--dist-tool goto copydist
if x%3==x--dist-tool goto copydist
if x%4==x--dist-tool goto copydist

set buildall=-a
if x%1==x--no-clean set buildall=
if x%2==x--no-clean set buildall=
if x%3==x--no-clean set buildall=
if x%4==x--no-clean set buildall=
if x%1==x--no-banner set buildall=%buildall% --no-banner
if x%2==x--no-banner set buildall=%buildall% --no-banner
if x%3==x--no-banner set buildall=%buildall% --no-banner
if x%4==x--no-banner set buildall=%buildall% --no-banner
set bootstrapflags=
if x%1==x--no-clean set bootstrapflags=--no-clean
if x%2==x--no-clean set bootstrapflags=--no-clean
if x%3==x--no-clean set bootstrapflags=--no-clean
if x%4==x--no-clean set bootstrapflags=--no-clean
if x%1==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner
if x%2==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner
if x%3==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner
if x%4==x--no-banner set bootstrapflags=%bootstrapflags% --no-banner

:: Run dist bootstrap to complete make.bash.
:: Bootstrap installs a proper cmd/dist, built with the new toolchain.
:: Throw ours, built with Go 1.4, away after bootstrap.
.\cmd\dist\dist.exe bootstrap %vflag% %buildall%
.\cmd\dist\dist.exe bootstrap -a %vflag% %bootstrapflags%
if errorlevel 1 goto fail
del .\cmd\dist\dist.exe
goto end
Expand Down
7 changes: 1 addition & 6 deletions src/make.rc
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,10 @@ if(~ $1 --dist-tool){
exit
}

buildall = -a
if(~ $1 --no-clean) {
buildall = ()
shift
}
# Run dist bootstrap to complete make.bash.
# Bootstrap installs a proper cmd/dist, built with the new toolchain.
# Throw ours, built with Go 1.4, away after bootstrap.
./cmd/dist/dist bootstrap $vflag $buildall $*
./cmd/dist/dist bootstrap -a $vflag $*
rm -f ./cmd/dist/dist

# DO NOT ADD ANY NEW CODE HERE.
Expand Down
3 changes: 0 additions & 3 deletions src/os/exec/lp_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,6 @@ func TestLookPath(t *testing.T) {
// Run all tests.
for i, test := range lookPathTests {
t.Run(fmt.Sprint(i), func(t *testing.T) {
if i == 16 {
t.Skip("golang.org/issue/44379")
}
dir := filepath.Join(tmp, "d"+strconv.Itoa(i))
err := os.Mkdir(dir, 0700)
if err != nil {
Expand Down
9 changes: 8 additions & 1 deletion src/runtime/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4686,7 +4686,7 @@ func sigprof(pc, sp, lr uintptr, gp *g, mp *m) {
return
}

// On mips{,le}, 64bit atomics are emulated with spinlocks, in
// On mips{,le}/arm, 64bit atomics are emulated with spinlocks, in
// runtime/internal/atomic. If SIGPROF arrives while the program is inside
// the critical section, it creates a deadlock (when writing the sample).
// As a workaround, create a counter of SIGPROFs while in critical section
Expand All @@ -4699,6 +4699,13 @@ func sigprof(pc, sp, lr uintptr, gp *g, mp *m) {
return
}
}
if GOARCH == "arm" && goarm < 7 && GOOS == "linux" && pc&0xffff0000 == 0xffff0000 {
// runtime/internal/atomic functions call into kernel
// helpers on arm < 7. See
// runtime/internal/atomic/sys_linux_arm.s.
cpuprof.lostAtomic++
return
}
}

// Profiling runs concurrently with GC, so it must not allocate.
Expand Down
2 changes: 1 addition & 1 deletion src/sync/atomic/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (v *Value) Swap(new interface{}) (old interface{}) {
}
}

// CompareAndSwapPointer executes the compare-and-swap operation for the Value.
// CompareAndSwap executes the compare-and-swap operation for the Value.
//
// All calls to CompareAndSwap for a given Value must use values of the same
// concrete type. CompareAndSwap of an inconsistent type panics, as does
Expand Down
6 changes: 3 additions & 3 deletions src/time/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ import "errors"
// The formats and 002 are space-padded and zero-padded
// three-character day of year; there is no unpadded day of year format.
//
// A decimal point followed by one or more zeros represents a fractional
// second, printed to the given number of decimal places.
// Either a comma or decimal point followed by one or more nines represents
// A comma or decimal point followed by one or more zeros represents
// a fractional second, printed to the given number of decimal places.
// A comma or decimal point followed by one or more nines represents
// a fractional second, printed to the given number of decimal places, with
// trailing zeros removed.
// For example "15:04:05,000" or "15:04:05.000" formats or parses with
Expand Down