doc/go1.18: discuss embedded build info compatibility

Fixes #50085

Change-Id: I9be8ddb983fb4fe598becbb0b93bb5b7e1f8438f
Reviewed-on: https://go-review.googlesource.com/c/go/+/372214
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
Hana 2021-12-15 08:40:30 -05:00 committed by Hyang-Ah Hana Kim
parent b5c0dbaafc
commit b1c7703f26

View file

@ -250,6 +250,15 @@ Do not send CLs removing the interior tags from such phrases.
package.
</p>
<p><!-- CL 369977 -->
The underlying data format of the embedded build information can change with
new go releases, so an older version of <code>go</code> may not handle the
build information produced with a newer version of <code>go</code>.
To read the version information from a binary built with <code>go</code> 1.18,
use the <code>go</code> <code>version</code> command and the
<code>debug/buildinfo</code> package from <code>go</code> 1.18+.
</p>
<p><!-- https://golang.org/issue/44435 -->
If the main module's <code>go.mod</code> file
specifies <a href="/ref/mod#go-mod-file-go"><code>go</code> <code>1.17</code></a>