Skip to content

Commit 74d366f

Browse files
author
Jay Conrod
committed
doc/go1.14: go command behavior with GO111MODULE=on outside modules
Hopefully this won't affect many people, but it's a substantial change in behavior for a specific case, so it's probably worth mentioning. Updates #32027 Change-Id: I61cd50e93d0199e94b011cc90150e072b6bb10ca Reviewed-on: https://go-review.googlesource.com/c/go/+/216597 Run-TryBot: Jay Conrod <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 6fbdfe4 commit 74d366f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

doc/go1.14.html

+26
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,32 @@ <h4 id="go-env-vars">Environment variables</h4>
217217
of <code>GOINSECURE</code> is a comma-separated list of glob patterns.
218218
</p>
219219

220+
<h4 id="commands-outside-modules">Commands outside modules</h4>
221+
222+
<p><!-- golang.org/issue/32027 -->
223+
When module-aware mode is enabled explicitly (by setting
224+
<code>GO111MODULE=on</code>), most module commands have more
225+
limited functionality if no <code>go.mod</code> file is present. For
226+
example, <code>go</code> <code>build</code>,
227+
<code>go</code> <code>run</code>, and other build commands can only build
228+
packages in the standard library and packages specified as <code>.go</code>
229+
files on the command line.
230+
</p>
231+
232+
<p>
233+
Previously, the <code>go</code> command would resolve each package path
234+
to the latest version of a module but would not record the module path
235+
or version. This resulted in <a href="https://golang.org/issue/32027">slow,
236+
non-reproducible builds</a>.
237+
</p>
238+
239+
<p>
240+
<code>go</code> <code>get</code> continues to work as before, as do
241+
<code>go</code> <code>mod</code> <code>download</code> and
242+
<code>go</code> <code>list</code> <code>-m</code> with explicit version
243+
patterns.
244+
</p>
245+
220246
<h4 id="incompatible-versions"><code>+incompatible</code> versions</h4>
221247
<!-- golang.org/issue/34165 -->
222248

0 commit comments

Comments
 (0)