1
0
mirror of https://github.com/golang/go synced 2024-11-22 18:54:44 -07:00

doc/go1.16: add multiple release notes for the go command

Added notes for:

* go test -c and -i flags used with unknown flags
* GO111MODULE=on by default
* GOVCS
* Dropped requirements on excluded versions

Removed TODOs for documentation on the retract directive and
'go install pkg@version'. These pages will be written after the beta.

Change-Id: Ic9877a62f908be177a6035a039b72e969e7b7f22
Reviewed-on: https://go-review.googlesource.com/c/go/+/274438
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Jay Conrod 2020-12-01 11:10:40 -05:00
parent f5978a0958
commit dd4a52c2a5

View File

@ -80,17 +80,16 @@ Do not send CLs removing the interior tags from such phrases.
<h3 id="go-command">Go command</h3>
<p>
TODO
<!-- CL 237697: https://golang.org/cl/237697: cmd/go: error when -c or -i are used with unknown flags -->
<!-- CL 255052: https://golang.org/cl/255052: cmd/go: default to GO111MODULE=on -->
<!-- CL 266420: https://golang.org/cl/266420: yes (mention go help vcs): cmd/go: add GOVCS setting to control version control usage -->
<!-- CL 244773: https://golang.org/cl/244773: cmd/go/internal/modload: drop requirements on excluded versions -->
</p>
<h4 id="modules">Modules</h4>
<p><!-- golang.org/issue/41330 -->
Module-aware mode is enabled by default, regardless of whether a
<code>go.mod</code> file is present in the current working directory or a
parent directory. Specifically, the <code>GO111MODULE</code> environment
variable now defaults to <code>on</code>. To switch to the previous behavior,
set <code>GO111MODULE</code> to <code>auto</code>.
</p>
<p><!-- golang.org/issue/40728 -->
Build commands like <code>go</code> <code>build</code> and <code>go</code>
<code>test</code> no longer modify <code>go.mod</code> and <code>go.sum</code>
@ -107,9 +106,7 @@ Do not send CLs removing the interior tags from such phrases.
<code>install</code> to build and install packages in module-aware mode,
ignoring the <code>go.mod</code> file in the current directory or any parent
directory, if there is one. This is useful for installing executables without
affecting the dependencies of the main module.<br>
TODO: write and link to section in golang.org/ref/mod<br>
TODO: write and link to blog post
affecting the dependencies of the main module.
</p>
<p><!-- golang.org/issue/40276 -->
@ -127,8 +124,6 @@ Do not send CLs removing the interior tags from such phrases.
to indicate that certain published versions of the module should not be used
by other modules. A module author may retract a version after a severe problem
is discovered or if the version was published unintentionally.<br>
TODO: write and link to section in golang.org/ref/mod<br>
TODO: write and link to tutorial or blog post
</p>
<p><!-- golang.org/issue/26603 -->
@ -138,6 +133,14 @@ Do not send CLs removing the interior tags from such phrases.
resolving missing packages.
</p>
<p><!-- golang.org/issue/36465 -->
The <code>go</code> command now ignores requirements on module versions
excluded by <code>exclude</code> directives in the main module. Previously,
the <code>go</code> command used the next version higher than an excluded
version, but that version could change over time, resulting in
non-reproducible builds.
</p>
<h4 id="go-test"><code>go</code> <code>test</code></h4>
<p><!-- golang.org/issue/29062 -->
@ -150,6 +153,15 @@ Do not send CLs removing the interior tags from such phrases.
that is still considered to be a passing test.
</p>
<p><!-- golang.org/issue/39484 -->
<code>go</code> <code>test</code> reports an error when the <code>-c</code>
or <code>-i</code> flags are used together with unknown flags. Normally,
unknown flags are passed to tests, but when <code>-c</code> or <code>-i</code>
are used, tests are not run.
</p>
<h4 id="go-get"><code>go</code> <code>get</code></h4>
<p><!-- golang.org/issue/37519 -->
The <code>go</code> <code>get</code> <code>-insecure</code> flag is
deprecated and will be removed in a future version. This flag permits
@ -161,8 +173,6 @@ Do not send CLs removing the interior tags from such phrases.
See <code>go</code> <code>help</code> <code>environment</code> for details.
</p>
<h4 id="go-get"><code>go</code> <code>get</code></h4>
<p><!-- golang.org/cl/263267 -->
<code>go</code> <code>get</code> <code>example.com/mod@patch</code> now
requires that some version of <code>example.com/mod</code> already be
@ -171,6 +181,21 @@ Do not send CLs removing the interior tags from such phrases.
to patch even newly-added dependencies.)
</p>
<h4 id="govcs"><code>GOVCS</code> environment variable</h4>
<p><!-- golang.org/issue/266420 -->
<code>GOVCS</code> is a new environment variable that limits which version
control tools the <code>go</code> command may use to download source code.
This mitigates security issues with tools that are typically used in trusted,
authenticated environments. By default, <code>git</code> and <code>hg</code>
may be used to download code from any repository. <code>svn</code>,
<code>bzr</code>, and <code>fossil</code> may only be used to download code
from repositories with module paths or package paths matching patterns in
the <code>GOPRIVATE</code> environment variable. See
<a href="/cmd/go/#hdr-Controlling_version_control_with_GOVCS"><code>go</code>
<code>help</code> <code>vcs</code></a> for details.
</p>
<h4 id="all-pattern">The <code>all</code> pattern</h4>
<p><!-- golang.org/cl/240623 -->