@@ -98,8 +98,14 @@ <h2 id="tools">Tools</h2>
98
98
< h3 id ="goroot "> Default GOROOT & GOTMPDIR</ h3 >
99
99
100
100
< p >
101
- TODO: default GOROOT changes in cmd/go
102
- TODO: computed GOROOT change
101
+ If the environment variable < code > $GOROOT</ code > is unset,
102
+ the go tool previously used the default < code > GOROOT</ code >
103
+ set during toolchain compilation.
104
+ Now, before falling back to that default, the go tool attempts to
105
+ deduce < code > GOROOT</ code > from its own executable path.
106
+ This allows binary distributions to be unpacked anywhere in the
107
+ file system and then be used without setting < code > GOROOT</ code >
108
+ explicitly.
103
109
</ p >
104
110
105
111
< p >
@@ -145,7 +151,7 @@ <h3 id="build">Build & Install</h3>
145
151
The old advice to add the < code > -i</ code > flag for speed, as in < code > go</ code > < code > build</ code > < code > -i</ code >
146
152
or < code > go</ code > < code > test</ code > < code > -i</ code > ,
147
153
is no longer necessary: builds run just as fast without < code > -i</ code > .
148
- For more details, see < a href ="TODO "> < code > go</ code > < code > help</ code > < code > cache</ code > </ a > .
154
+ For more details, see < a href ="/cmd/go/#hdr-Build_and_test_caching "> < code > go</ code > < code > help</ code > < code > cache</ code > </ a > .
149
155
</ p >
150
156
151
157
< p >
@@ -406,17 +412,10 @@ <h3 id="gofmt">Gofmt</h3>
406
412
< p >
407
413
If multiple programs must agree about which version of gofmt is used to format a source file,
408
414
we recommend that they do this by arranging to invoke the same gofmt binary.
409
- For example, in the Go open source repository, we arrange for goimports and
410
- our Git pre-commit hook to agree about source code formatting by having both
411
- invoke the gofmt binary found in the current path.
412
- TODO: Make goimports actually do that. #22695.
413
- As another example, inside Google we arrange that source code presubmit
414
- checks run a gofmt binary maintained at a fixed path in a shared, distributed file system;
415
- that on engineering workstations < code > /usr/bin/gofmt</ code >
416
- is a symbolic link to that same path;
417
- and that all editor integrations used for Google development
418
- explicitly invoke /usr/bin/gofmt.
419
- TODO: TMI?
415
+ For example, in the Go open source repository, our Git pre-commit hook is written in Go
416
+ and could import < code > go/format</ code > directly but instead invokes the < code > gofmt</ code >
417
+ binary found in the current path, so that the pre-commit hook need not be recompiled
418
+ each time < code > gofmt</ code > changes.
420
419
</ p >
421
420
422
421
< h3 id ="compiler "> Compiler Toolchain</ h3 >
@@ -578,12 +577,23 @@ <h2 id="runtime">Runtime</h2>
578
577
</ p >
579
578
580
579
< p >
581
- There is no longer a limit on the < a href ="/pkg/runtime/#GOMAXPROCS "> < code > GOMAXPROCS</ code > </ a > setting.
582
- (In Go 1.9 the limit was 1024.)
580
+ The garbage collector has been modified to reduce its impact on allocation latency.
581
+ It now uses a smaller fraction of the overall CPU when running, but it may run more of the time.
582
+ The total CPU consumed by the garbage collector has not changed significantly.
583
583
</ p >
584
584
585
585
< p >
586
- TODO: Anything about CL 59970: "runtime: separate soft and hard heap limits"?
586
+ The < a href ="/pkg/runtime/#GOROOT "> < code > GOROOT</ code > </ a > function
587
+ now defaults (when the < code > $GOROOT</ code > environment variable is not set)
588
+ to the < code > GOROOT</ code > or < code > GOROOT_FINAL</ code > in effect
589
+ at the time the calling program was compiled.
590
+ Previously it used the < code > GOROOT</ code > or < code > GOROOT_FINAL</ code > in effect
591
+ at the time the toolchain that compiled the calling program was compiled.
592
+ </ p >
593
+
594
+ < p >
595
+ There is no longer a limit on the < a href ="/pkg/runtime/#GOMAXPROCS "> < code > GOMAXPROCS</ code > </ a > setting.
596
+ (In Go 1.9 the limit was 1024.)
587
597
</ p >
588
598
589
599
< h2 id ="performance "> Performance</ h2 >
@@ -1035,9 +1045,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
1035
1045
break out of the innermost < code > {{"{{range"}}</ code > ...< code > }}</ code > loop,
1036
1046
like the corresponding Go statements.
1037
1047
</ p >
1038
- < p >
1039
- TODO: something about the AddParseTree problem (#21844).
1040
- </ p >
1041
1048
</ dl >
1042
1049
1043
1050
< dl id ="math/big "> < dt > < a href ="/pkg/math/big/ "> math/big</ a > </ dt >
0 commit comments