1
0
mirror of https://github.com/golang/go synced 2024-11-07 02:56:11 -07:00
go/doc/go1.14.html
Jay Conrod c357b363cf cmd/go: add -modfile flag that sets go.mod file to read/write
This change adds the -modfile flag to module aware build commands and
to 'go mod' subcommands. -modfile may be set to a path to an alternate
go.mod file to be read and written. A real go.mod file must still
exist and is used to set the module root directory. However, it is not
opened.

When -modfile is set, the effective location of the go.sum file is
also changed to the -modfile with the ".mod" suffix trimmed (if
present) and ".sum" added.

Updates #34506

Change-Id: I2d1e044e18af55505a4f24bbff09b73bb9c908b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/202564
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-10-24 20:15:50 +00:00

250 lines
7.7 KiB
HTML

<!--{
"Title": "Go 1.14 Release Notes",
"Path": "/doc/go1.14",
"Template": true
}-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<style>
main ul li { margin: 0.5em 0; }
</style>
<h2 id="introduction">DRAFT RELEASE NOTES — Introduction to Go 1.14</h2>
<p>
<strong>
Go 1.14 is not yet released. These are work-in-progress
release notes. Go 1.14 is expected to be released in February 2020.
</strong>
</p>
<h2 id="language">Changes to the language</h2>
<p>
TODO
</p>
<h2 id="ports">Ports</h2>
<p>
TODO: is Dragonfly passing? On both Dragonfly release & tip? (ABI
change happened) Does the net package's interface APIs work on both?
https://golang.org/issue/34368.
</p>
<p>
TODO: is Illumos up with a builder and passing?
https://golang.org/issue/15581.
</p>
<p>
TODO: announce something about the Go Solaris port? Solaris itself
is unmaintained? The builder is still running at Oracle, but the
employee who set it up left the company and we have no way to
maintain it.
</p>
<h3 id="darwin">Darwin</h3>
<p><!-- golang.org/issue/34749 -->
Go 1.14 is the last Go release to support 32-bit binaries on
macOS (the <code>darwin/386</code> port). They are no longer
supported by macOS, starting with macOS 10.15 (Catalina).
</p>
<h3 id="nacl">Native Client (NaCl)</h3>
<p><!-- golang.org/issue/30439 -->
As <a href="go1.13#ports">announced</a> in the Go 1.13 release notes,
Go 1.14 drops support for the Native Client platform (<code>GOOS=nacl</code>).
</p>
<h2 id="tools">Tools</h2>
<p>
TODO
</p>
<h3 id="go-command">Go command</h3>
<!-- golang.org/issue/33848 -->
<p>
When the main module contains a top-level <code>vendor</code> directory and
its <code>go.mod</code> file specifies <code>go</code> <code>1.14</code> or
higher, the <code>go</code> command now defaults to <code>-mod=vendor</code>
for operations that accept that flag. A new value for that flag,
<code>-mod=mod</code>, causes the <code>go</code> command to instead load
modules from the module cache (as when no <code>vendor</code> directory is
present).
</p>
<p>
When <code>-mod=vendor</code> is set (explicitly or by default), the
<code>go</code> command now verifies that the main module's
<code>vendor/modules.txt</code> file is consistent with its
<code>go.mod</code> file.
</p>
<p>
<code>go</code> <code>list</code> <code>-m</code> no longer silently omits
transitive dependencies that do not provide packages in
the <code>vendor</code> directory. It now fails explicitly if
<code>-mod=vendor</code> is set.
</p>
<p><!-- golang.org/issue/32502, golang.org/issue/30345 -->
The <code>go</code> <code>get</code> command no longer accepts
the <code>-mod</code> flag. Previously, the flag's setting either
<a href="https://golang.org/issue/30345">was ignored</a> or
<a href="https://golang.org/issue/32502">caused the build to fail</a>.
</p>
<p><!-- golang.org/issue/30748 -->
The <code>go</code> command now includes snippets of plain-text error messages
from module proxies and other HTTP servers.
An error message will only be shown if it is valid UTF-8 and consists of only
graphic characters and spaces.
</p>
<p><!-- golang.org/issue/31481 -->
<code>-modcacherw</code> is a new flag that instructs the <code>go</code>
command to leave newly-created directories in the module cache at their
default permissions rather than making them read-only.
The use of this flag makes it more likely that tests or other tools will
accidentally add files not included in the module's verified checksum.
However, it allows the use of <code>rm</code> <code>-rf</code>
(instead of <code>go</code> <code>clean</code> <code>-modcache</code>)
to remove the module cache.
</p>
<p><!-- golang.org/issue/34506 -->
<code>-modfile=file</code> is a new flag that instructs the <code>go</code>
command to read (and possibly write) an alternate go.mod file instead of the
one in the module root directory. A file named "go.mod" must still be present
in order to determine the module root directory, but it is not
accessed. When <code>-modfile</code> is specified, an alternate go.sum file
is also used: its path is derived from the <code>-modfile</code> flag by
trimming the ".mod" extension and appending ".sum".
</p>
<h2 id="runtime">Runtime</h2>
<p>
TODO
</p>
<h2 id="library">Core library</h2>
<p>
TODO
</p>
<dl id="bytes/hash"><dt><a href="/pkg/bytes/hash/">bytes/hash</a></dt>
<dd>
<p><!-- CL 186877 -->
TODO: <a href="https://golang.org/cl/186877">https://golang.org/cl/186877</a>: add hashing package for bytes and strings
</p>
</dl><!-- bytes/hash -->
<dl id="crypto/tls"><dt><a href="/pkg/crypto/tls/">crypto/tls</a></dt>
<dd>
<p><!-- CL 191976 -->
TODO: <a href="https://golang.org/cl/191976">https://golang.org/cl/191976</a>: remove SSLv3 support
</p>
<p><!-- CL 191999 -->
TODO: <a href="https://golang.org/cl/191999">https://golang.org/cl/191999</a>: remove TLS 1.3 opt-out
</p>
<p><!-- CL 174329 -->
The <code>tls</code> package no longer supports NPN and now only
supports ALPN. In previous releases it supported both. There are
no API changes and code should function identically as before.
Most other clients & servers have already removed NPN support in
favor of the standardized ALPN.
</p>
</dl><!-- crypto/tls -->
<dl id="encoding/asn1"><dt><a href="/pkg/encoding/asn1/">encoding/asn1</a></dt>
<dd>
<p><!-- CL 126624 -->
TODO: <a href="https://golang.org/cl/126624">https://golang.org/cl/126624</a>: handle ASN1&#39;s string type BMPString
</p>
</dl><!-- encoding/asn1 -->
<dl id="mime"><dt><a href="/pkg/mime/">mime</a></dt>
<dd>
<p><!-- CL 186927 -->
TODO: <a href="https://golang.org/cl/186927">https://golang.org/cl/186927</a>: update type of .js and .mjs files to text/javascript
</p>
</dl><!-- mime -->
<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
<dd>
<p><!-- CL 127458 -->
The new <a href="/pkg/math/#Fma"><code>Fma</code></a> function
computes <code>x*y+z</code> in floating point with no
intermediate rounding of the <code>x*y</code>
computation. Several architectures implement this computation
using dedicated hardware instructions for additional
performance.
</p>
</dl><!-- math -->
<dl id="plugin"><dt><a href="/pkg/plugin/">plugin</a></dt>
<dd>
<p><!-- CL 191617 -->
TODO: <a href="https://golang.org/cl/191617">https://golang.org/cl/191617</a>: add freebsd/amd64 plugin support
</p>
</dl><!-- plugin -->
<dl id="reflect">
<dt><a href="/pkg/reflect/">reflect</a></dt>
<dd>
<p><!-- CL 85661 -->
<a href="/pkg/reflect#StructOf"><code>StructOf</code></a> now
supports creating struct types with unexported fields, by
setting the <code>PkgPath</code> field in
a <code>StructField</code> element.
</p>
</dl><!-- reflect -->
<dl id="runtime"><dt><a href="/pkg/runtime/">runtime</a></dt>
<dd>
<p><!-- CL 187739 -->
TODO: <a href="https://golang.org/cl/187739">https://golang.org/cl/187739</a>: treat CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, CTRL_SHUTDOWN_EVENT as SIGTERM on Windows
</p>
<p><!-- CL 188297 -->
TODO: <a href="https://golang.org/cl/188297">https://golang.org/cl/188297</a>: don&#39;t forward SIGPIPE on macOS
</p>
</dl><!-- runtime -->
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
As always, there are various minor changes and updates to the library,
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
in mind.
</p>
<p>
TODO
</p>