<commit_before><!--{
        "Title": "Go 1.12 Release Notes",
        "Path":  "/doc/go1.12",
        "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>
  ul li { margin: 0.5em 0; }
</style>

<h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.12</h2>

<p>
  <strong>
    Go 1.12 is not yet released. These are work-in-progress
    release notes. Go 1.12 is expected to be released in February 2019.
  </strong>
</p>

<p>
  The latest Go release, version 1.12, arrives six months after <a href="go1.11">Go 1.11</a>.
  Most of its changes are in TODO.
  As always, the release maintains the Go 1 <a href="/doc/go1compat.html">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>

<p>
  There are no changes to the language specification.
</p>

<h2 id="ports">Ports</h2>

<h3 id="freebsd">FreeBSD</h3>

<p>
  Go 1.12 is the last release that is supported on FreeBSD 10.x, which has
  already reached end-of-life. Go 1.13 will require FreeBSD 11.2+ or FreeBSD
  12.0+.
</p>

<h3 id="darwin">Darwin</h3>

<p>
Go 1.12 is the last release that will run on macOS 10.10 Yosemite.
Go 1.13 will require macOS 10.11 El Capitan or later.
</p>

<h3 id="windows">Windows</h3>

<p>
  TODO: status of ARM32 port?
</p>

<h3 id="aix">AIX</h3>

<p>
  TODO: status of AIX port?
</p>

<h3 id="hurd">Hurd</h3>

<p><!-- CL 146023 -->
  <code>hurd</code> is now a recognized value for <code>GOOS</code>, reserved
  for the GNU/Hurd system for use with <code>gccgo</code>.
</p>

<h2 id="tools">Tools</h2>

<h3 id="vet"><code>go tool vet</code> no longer supported</h3>

<p>
  The <code>go vet</code> command has been rewritten to serve as the
  base for a range of different source code analysis tools. See
  the <a href="https://godoc.org/golang.org/x/tools/go/analysis">golang.org/x/tools/go/analysis</a>
  package for details. A side-effect is that <code>go tool vet</code>
  is no longer supported. External tools that use <code>go tool
  vet</code> must be changed to use <code>go
  vet</code>. Using <code>go vet</code> instead of <code>go tool
  vet</code> should work with all supported versions of Go.
</p>

<h3 id="gocache">Build cache requirement</h3>

<p>
  The build cache is now required as a step toward eliminating
  <code>$GOPATH/pkg</code>. Setting the environment variable
  <code>GOCACHE=off</code> to disable the
  <a href="/cmd/go/#hdr-Build_and_test_caching">build cache</a>
  has no effect in Go 1.12.
</p>

<h3 id="binary-only">Binary-only packages</h3>

<p>
  Go 1.12 is the last release that will support binary-only packages.
</p>

<h3 id="modules">Modules</h3>

<p><!-- CL 148517 -->
  When <code>GO111MODULE</code> is set to <code>on</code>, the <code>go</code>
  command now supports module-aware operations outside of a module directory,
  provided that those operations do not need to resolve import paths relative to
  the current directory or explicitly edit the <code>go.mod</code> file.
  Commands such as <code>go</code> <code>get</code>,
  <code>go</code> <code>list</code>, and
  <code>go</code> <code>mod</code> <code>download</code> behave as if in a
  module with initially-empty requirements.
  In this mode, <code>go</code> <code>env</code> <code>GOMOD</code> reports
  the system's null device (<code>/dev/null</code> or <code>NUL</code>).
</p>

<p><!-- CL 146382 -->
  <code>go</code> commands that download and extract modules are now safe to
  invoke concurrently.
  The module cache (<code>GOPATH/pkg/mod</code>) must reside in a filesystem that
  supports file locking.
</p>

<p><!-- CL 147282, 147281 -->
  The <code>go</code> directive in a <code>go.mod</code> file now indicates the
  version of the language used by the files within that module, and
  <code>go</code> <code>mod</code> <code>tidy</code> sets it to the
  current release (<code>go</code> <code>1.12</code>) if no existing
  version is present.
  If the <code>go</code> directive for a module specifies a
  version <em>newer</em> than the toolchain in use, the <code>go</code> command
  will attempt to build the packages regardless, and will note the mismatch only if
  that build fails.
</p>

<h3 id="compiler">Compiler toolchain</h3>

<p><!-- CL 134155, 134156 -->
  The compiler's live variable analysis has improved. This may mean that
  finalizers will be executed sooner in this release than in previous<commit_msg>doc: mention the use of replacements to resolve imports for 1.12<commit_after><!--{
        "Title": "Go 1.12 Release Notes",
        "Path":  "/doc/go1.12",
        "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>
  ul li { margin: 0.5em 0; }
</style>

<h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.12</h2>

<p>
  <strong>
    Go 1.12 is not yet released. These are work-in-progress
    release notes. Go 1.12 is expected to be released in February 2019.
  </strong>
</p>

<p>
  The latest Go release, version 1.12, arrives six months after <a href="go1.11">Go 1.11</a>.
  Most of its changes are in TODO.
  As always, the release maintains the Go 1 <a href="/doc/go1compat.html">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>

<p>
  There are no changes to the language specification.
</p>

<h2 id="ports">Ports</h2>

<h3 id="freebsd">FreeBSD</h3>

<p>
  Go 1.12 is the last release that is supported on FreeBSD 10.x, which has
  already reached end-of-life. Go 1.13 will require FreeBSD 11.2+ or FreeBSD
  12.0+.
</p>

<h3 id="darwin">Darwin</h3>

<p>
Go 1.12 is the last release that will run on macOS 10.10 Yosemite.
Go 1.13 will require macOS 10.11 El Capitan or later.
</p>

<h3 id="windows">Windows</h3>

<p>
  TODO: status of ARM32 port?
</p>

<h3 id="aix">AIX</h3>

<p>
  TODO: status of AIX port?
</p>

<h3 id="hurd">Hurd</h3>

<p><!-- CL 146023 -->
  <code>hurd</code> is now a recognized value for <code>GOOS</code>, reserved
  for the GNU/Hurd system for use with <code>gccgo</code>.
</p>

<h2 id="tools">Tools</h2>

<h3 id="vet"><code>go tool vet</code> no longer supported</h3>

<p>
  The <code>go vet</code> command has been rewritten to serve as the
  base for a range of different source code analysis tools. See
  the <a href="https://godoc.org/golang.org/x/tools/go/analysis">golang.org/x/tools/go/analysis</a>
  package for details. A side-effect is that <code>go tool vet</code>
  is no longer supported. External tools that use <code>go tool
  vet</code> must be changed to use <code>go
  vet</code>. Using <code>go vet</code> instead of <code>go tool
  vet</code> should work with all supported versions of Go.
</p>

<h3 id="gocache">Build cache requirement</h3>

<p>
  The build cache is now required as a step toward eliminating
  <code>$GOPATH/pkg</code>. Setting the environment variable
  <code>GOCACHE=off</code> to disable the
  <a href="/cmd/go/#hdr-Build_and_test_caching">build cache</a>
  has no effect in Go 1.12.
</p>

<h3 id="binary-only">Binary-only packages</h3>

<p>
  Go 1.12 is the last release that will support binary-only packages.
</p>

<h3 id="modules">Modules</h3>

<p><!-- CL 148517 -->
  When <code>GO111MODULE</code> is set to <code>on</code>, the <code>go</code>
  command now supports module-aware operations outside of a module directory,
  provided that those operations do not need to resolve import paths relative to
  the current directory or explicitly edit the <code>go.mod</code> file.
  Commands such as <code>go</code> <code>get</code>,
  <code>go</code> <code>list</code>, and
  <code>go</code> <code>mod</code> <code>download</code> behave as if in a
  module with initially-empty requirements.
  In this mode, <code>go</code> <code>env</code> <code>GOMOD</code> reports
  the system's null device (<code>/dev/null</code> or <code>NUL</code>).
</p>

<p><!-- CL 146382 -->
  <code>go</code> commands that download and extract modules are now safe to
  invoke concurrently.
  The module cache (<code>GOPATH/pkg/mod</code>) must reside in a filesystem that
  supports file locking.
</p>

<p><!-- CL 147282, 147281 -->
  The <code>go</code> directive in a <code>go.mod</code> file now indicates the
  version of the language used by the files within that module, and
  <code>go</code> <code>mod</code> <code>tidy</code> sets it to the
  current release (<code>go</code> <code>1.12</code>) if no existing
  version is present.
  If the <code>go</code> directive for a module specifies a
  version <em>newer</em> than the toolchain in use, the <code>go</code> command
  will attempt to build the packages regardless, and will note the mismatch only if
  that build fails.
</p>

<p><!-- CL 152739 -->
  When an import cannot be resolved using the active modules,
  the <code>go</code> command will now try to use the modules mentioned in the
  main module's <code>replace</code> directives before consulting the module
  cache and the usual network sources.
  If a matching replacement is found but the <code>replace</code> directive does
  not specify a version, the <code>go</code> command uses a pseudo-version
  derived from the zero <code>time.Time</code> (such
  as <code>v0.0.0-00010101000000-000000000000</code>).
</p>

<h3 id="compiler">Compiler toolchain</h3>

<p><!-- CL 134155, 134156 -->
  The compiler's live variable analysis has improved. This may mean that
  finalizers will be executed sooner in this release than in previous
{'fraction_non_alphanumeric': 0.13515420278169724, 'fraction_numerical': 0.03305785123966942, 'mean_word_length': 3.772967772967773, 'pattern_counts': {'":': 6, '<': 338, '<?xml version=': 0, '>': 338, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5851505', 'n_tokens_mistral': 3581, 'n_tokens_neox': 3327, 'n_words': 1274}