Skip to content

Commit 7e88015

Browse files
ianlancetaylorbradfitz
authored andcommitted
[release-branch.go1.12] doc/go1.12: new go line in go.mod can break builds with Go 1.11 - 1.11.3
Updates #30446 Change-Id: If069f72fa9735f839df92f3ede3bf7b6d7a695a5 Reviewed-on: https://go-review.googlesource.com/c/164317 Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> (cherry picked from commit e32203f) Reviewed-on: https://go-review.googlesource.com/c/go/+/164318
1 parent 4dd46a6 commit 7e88015

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/go1.12.html

+11
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ <h3 id="modules">Modules</h3>
185185
that build fails.
186186
</p>
187187

188+
<p><!-- CL 147282, 147281 -->
189+
This changed use of the <code>go</code> directive means that if you
190+
use Go 1.12 to build a module, thus recording <code>go 1.12</code>
191+
in the <code>go.mod</code> file, you will get an error when
192+
attempting to build the same module with Go 1.11 through Go 1.11.3.
193+
Go 1.11.4 or later will work fine, as will releases older than Go 1.11.
194+
If you must use Go 1.11 through 1.11.3, you can avoid the problem by
195+
setting the language version to 1.11, using the Go 1.12 go tool,
196+
via <code>go mod edit -go=1.11</code>.
197+
</p>
198+
188199
<p><!-- CL 152739 -->
189200
When an import cannot be resolved using the active modules,
190201
the <code>go</code> command will now try to use the modules mentioned in the

0 commit comments

Comments
 (0)