<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/cmd/go/testdata, branch master</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>cmd: update vendored golang.org/x/mod</title>
<updated>2023-05-17T17:26:48+00:00</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>dmitshur@golang.org</email>
</author>
<published>2023-05-12T12:55:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=6a41be228e1f59dae6001e058fd1b27c79592777'/>
<id>6a41be228e1f59dae6001e058fd1b27c79592777</id>
<content type='text'>
Pull in CL 492990. This teaches 'go mod tidy' and other go subcommands
that write go.mod files to use semantic sort for exclude blocks, gated
on said files declaring Go version 1.21 or higher.

go get golang.org/x/mod@e7bea8f1d64f  # includes CL 492990
go mod tidy
go mod vendor

Fixes #60028.

Change-Id: Ia9342dcc23cd68de068a70657b59c25f69afa381
Reviewed-on: https://go-review.googlesource.com/c/go/+/494578
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull in CL 492990. This teaches 'go mod tidy' and other go subcommands
that write go.mod files to use semantic sort for exclude blocks, gated
on said files declaring Go version 1.21 or higher.

go get golang.org/x/mod@e7bea8f1d64f  # includes CL 492990
go mod tidy
go mod vendor

Fixes #60028.

Change-Id: Ia9342dcc23cd68de068a70657b59c25f69afa381
Reviewed-on: https://go-review.googlesource.com/c/go/+/494578
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: prune more dependencies in 'go get'</title>
<updated>2023-05-17T13:05:03+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-11-18T22:35:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=a094a82452ea4f1242ec9f3b1c0f9f230c2b2a6d'/>
<id>a094a82452ea4f1242ec9f3b1c0f9f230c2b2a6d</id>
<content type='text'>
Prior to this change, 'go get' pulled in every version of each module
whose path is explicitly listed in the go.mod file. When graph pruning
is enabled (that is, when the main module is at 'go 1.17' or higher),
that pulled in transitive dependencies of older-than-selected versions
of dependencies, which are normally pruned out by other 'go' commands
(including 'go mod tidy' and 'go mod graph').

To make matters worse, different parts of `go get` were making
different assumptions about which kinds of conflicts would be
reported: the modget package assumed that any conflict is necessarily
due to some explicit constraint, but 'go get' was imposing an
additional constraint that modules could not be incidentally upgraded
in the course of a downgrade. When that additional constraint failed,
the modload package reported the failure as though it were a real
(caller-supplied) constraint, confusing the caller (which couldn't
identify any specific package or argument that caused the failure).

This change fixes both of those problems by replacing the
modload.EditRequirements algorithm with a different one.

The new algorithm is, roughly, as follows.

1. Propose a list of “root requirements” to be written to the updated
   go.mod file.

2. Load the module graph from those requirements mostly as usual, but
   if any root is upgraded due to transitive dependencies, retain the
   original roots and the paths leading from those roots to the
   upgrades. (This forms an “extended graph”, in which we can trace a
   path from to each version that appears in the graph starting at one
   or more of the original roots.)

3. Identify which roots caused any module path to be upgraded above
   its passed-in version constraint. For each such root, either report
   an unresolvable conflict (if the root itself is constrained to a
   specific version) or identify an updated version to propose: either
   a downgrade to the next-highest version, or an upgrade to the
   actually-selected version of the root (if that version is allowed).
   To avoid looping forever or devolving into an NP-complete search,
   we never propose a version that was already rejected previously,
   regardless of what other roots were present alongside it at the
   time.

4. If the version of any root was changed, repeat from (1).

This algorithm is guaranteed to terminate, because there are finitely
many root versions and we permanently reject at least one each time we
downgrade its path to a lower version.

In addition, this change implements support for the '-v' flag to log
more information about version changes at each iteration.

Fixes #56494.
Fixes #55955.

Change-Id: Iebc17dd7586594d5732e228043c3c4c6da230f44
Reviewed-on: https://go-review.googlesource.com/c/go/+/471595
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior to this change, 'go get' pulled in every version of each module
whose path is explicitly listed in the go.mod file. When graph pruning
is enabled (that is, when the main module is at 'go 1.17' or higher),
that pulled in transitive dependencies of older-than-selected versions
of dependencies, which are normally pruned out by other 'go' commands
(including 'go mod tidy' and 'go mod graph').

To make matters worse, different parts of `go get` were making
different assumptions about which kinds of conflicts would be
reported: the modget package assumed that any conflict is necessarily
due to some explicit constraint, but 'go get' was imposing an
additional constraint that modules could not be incidentally upgraded
in the course of a downgrade. When that additional constraint failed,
the modload package reported the failure as though it were a real
(caller-supplied) constraint, confusing the caller (which couldn't
identify any specific package or argument that caused the failure).

This change fixes both of those problems by replacing the
modload.EditRequirements algorithm with a different one.

The new algorithm is, roughly, as follows.

1. Propose a list of “root requirements” to be written to the updated
   go.mod file.

2. Load the module graph from those requirements mostly as usual, but
   if any root is upgraded due to transitive dependencies, retain the
   original roots and the paths leading from those roots to the
   upgrades. (This forms an “extended graph”, in which we can trace a
   path from to each version that appears in the graph starting at one
   or more of the original roots.)

3. Identify which roots caused any module path to be upgraded above
   its passed-in version constraint. For each such root, either report
   an unresolvable conflict (if the root itself is constrained to a
   specific version) or identify an updated version to propose: either
   a downgrade to the next-highest version, or an upgrade to the
   actually-selected version of the root (if that version is allowed).
   To avoid looping forever or devolving into an NP-complete search,
   we never propose a version that was already rejected previously,
   regardless of what other roots were present alongside it at the
   time.

4. If the version of any root was changed, repeat from (1).

This algorithm is guaranteed to terminate, because there are finitely
many root versions and we permanently reject at least one each time we
downgrade its path to a lower version.

In addition, this change implements support for the '-v' flag to log
more information about version changes at each iteration.

Fixes #56494.
Fixes #55955.

Change-Id: Iebc17dd7586594d5732e228043c3c4c6da230f44
Reviewed-on: https://go-review.googlesource.com/c/go/+/471595
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: add a test that reproduces the root cause of issue #56494</title>
<updated>2023-05-17T13:04:59+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2022-11-03T21:12:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=9fd876924a0bc5f94c18ae8b9dce22ad48da9a8f'/>
<id>9fd876924a0bc5f94c18ae8b9dce22ad48da9a8f</id>
<content type='text'>
For #56494.

Change-Id: I9bbded6d014ac73d81b973f2d7b4783e64380031
Reviewed-on: https://go-review.googlesource.com/c/go/+/447797
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For #56494.

Change-Id: I9bbded6d014ac73d81b973f2d7b4783e64380031
Reviewed-on: https://go-review.googlesource.com/c/go/+/447797
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go/internal/modload: replace import error message from goroot to std</title>
<updated>2023-05-15T16:24:01+00:00</updated>
<author>
<name>jchen038</name>
<email>mfwinds@gmail.com</email>
</author>
<published>2022-11-29T08:05:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=1b896bff30c7622e6d26a1fd30a73d964a860481'/>
<id>1b896bff30c7622e6d26a1fd30a73d964a860481</id>
<content type='text'>
When importing a package that does not exist, it would show goroot error
message and path. We would like to replace goroot with std instead.

Fixes #56965.

Change-Id: I86f8a7fab6555b68f792a3a4686de20d51eced8b
Reviewed-on: https://go-review.googlesource.com/c/go/+/453895
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When importing a package that does not exist, it would show goroot error
message and path. We would like to replace goroot with std instead.

Fixes #56965.

Change-Id: I86f8a7fab6555b68f792a3a4686de20d51eced8b
Reviewed-on: https://go-review.googlesource.com/c/go/+/453895
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: add a regression test for Git configurations with safe.bareRepository=explicit</title>
<updated>2023-05-12T17:56:45+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-05-08T13:15:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=acd8dc95833182df86831ec78e7470864bdb3b88'/>
<id>acd8dc95833182df86831ec78e7470864bdb3b88</id>
<content type='text'>
Change-Id: I394265a4bf849ec89ac44c67aeaaaca801e46caa
Reviewed-on: https://go-review.googlesource.com/c/go/+/493476
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Reviewed-by: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I394265a4bf849ec89ac44c67aeaaaca801e46caa
Reviewed-on: https://go-review.googlesource.com/c/go/+/493476
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Emily Shaffer &lt;emilyshaffer@google.com&gt;
Reviewed-by: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go/internal/modload: reject the -modfile flag in workspace mode</title>
<updated>2023-05-12T17:42:47+00:00</updated>
<author>
<name>Zeke Lu</name>
<email>lvzecai@gmail.com</email>
</author>
<published>2023-05-09T23:25:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=d6cc77fa2532799609cff369af65378a83ab9030'/>
<id>d6cc77fa2532799609cff369af65378a83ab9030</id>
<content type='text'>
Currently, in workspace mode, the -modfile flag affects all the modules
listed in the go.work file. This is not desirable most of the time. And
when it results in an error, the error message does not help.

For example, when there are more than one modules listed in the go.work
file, running "go list -m -modfile=path/to/go.mod" gives this error:
  go: module example.com/foo appears multiple times in workspace

This change reject -modfile flag explicitly with this error message:
  go: -modfile cannot be used in workspace mode

While at here, correct some typos in the modload package.

Fixes #59996.

Change-Id: Iff4cd9f3974ea359889dd713a747b6932cf42dfd
GitHub-Last-Rev: 7dbc9c3f2f9bfe8acab088eb3266a08d8ec1ba16
GitHub-Pull-Request: golang/go#60033
Reviewed-on: https://go-review.googlesource.com/c/go/+/493315
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, in workspace mode, the -modfile flag affects all the modules
listed in the go.work file. This is not desirable most of the time. And
when it results in an error, the error message does not help.

For example, when there are more than one modules listed in the go.work
file, running "go list -m -modfile=path/to/go.mod" gives this error:
  go: module example.com/foo appears multiple times in workspace

This change reject -modfile flag explicitly with this error message:
  go: -modfile cannot be used in workspace mode

While at here, correct some typos in the modload package.

Fixes #59996.

Change-Id: Iff4cd9f3974ea359889dd713a747b6932cf42dfd
GitHub-Last-Rev: 7dbc9c3f2f9bfe8acab088eb3266a08d8ec1ba16
GitHub-Pull-Request: golang/go#60033
Reviewed-on: https://go-review.googlesource.com/c/go/+/493315
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: diff .so files quietly in TestScript/build_plugin_reproducible</title>
<updated>2023-05-12T14:29:53+00:00</updated>
<author>
<name>Dmitri Shuralyov</name>
<email>dmitshur@golang.org</email>
</author>
<published>2023-05-12T12:54:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=ed3ea520812e314b2948ae39267105fa517bd9fe'/>
<id>ed3ea520812e314b2948ae39267105fa517bd9fe</id>
<content type='text'>
This avoids printing verbose binary data and making bell sounds when the
test fails. The binary data can be inspected via other means if needed.

For #58557.

Change-Id: Ia1c4f2c6b9ff2cf6f97611cf335b978fc7bb201f
Reviewed-on: https://go-review.googlesource.com/c/go/+/494577
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids printing verbose binary data and making bell sounds when the
test fails. The binary data can be inspected via other means if needed.

For #58557.

Change-Id: Ia1c4f2c6b9ff2cf6f97611cf335b978fc7bb201f
Reviewed-on: https://go-review.googlesource.com/c/go/+/494577
Auto-Submit: Dmitri Shuralyov &lt;dmitshur@golang.org&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go/internal/modload: skip reading go.mod files for imports in 'go mod tidy' of modules before 'go 1.21'</title>
<updated>2023-05-10T14:36:26+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-05-05T20:50:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=46847c639b3e5b3df0c4b06fd19d1cc90bc0306e'/>
<id>46847c639b3e5b3df0c4b06fd19d1cc90bc0306e</id>
<content type='text'>
This eliminate a network access in 'go mod tidy' of an already-tidy
module, which would otherwise be needed to fetch go.mod checksums for
the test dependencies whose go.mod checksums were omitted in Go
releases between Go 1.17 and 1.20 due to bug #56222.

For modules between 'go 1.17' and 'go 1.20' we intentionally preserve
the old 'go mod tidy' output (omitting go.sum entries for the go.mod
files of test dependencies of external packages). We should also avoid
performing extra sumdb lookups for checksums that would be discarded
anyway.

Updates #56222.

Change-Id: I7f0f1c8e902db0e3414c819621c4b99052f503f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/492741
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This eliminate a network access in 'go mod tidy' of an already-tidy
module, which would otherwise be needed to fetch go.mod checksums for
the test dependencies whose go.mod checksums were omitted in Go
releases between Go 1.17 and 1.20 due to bug #56222.

For modules between 'go 1.17' and 'go 1.20' we intentionally preserve
the old 'go mod tidy' output (omitting go.sum entries for the go.mod
files of test dependencies of external packages). We should also avoid
performing extra sumdb lookups for checksums that would be discarded
anyway.

Updates #56222.

Change-Id: I7f0f1c8e902db0e3414c819621c4b99052f503f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/492741
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
Reviewed-by: Carlos Amedee &lt;carlos@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd: go get golang.org/x/tools@8f7fb01dd429 and revendor</title>
<updated>2023-05-09T01:28:01+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2023-05-08T17:38:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=e5e61a03d9f448977c233a2b023e56535fcd705e'/>
<id>e5e61a03d9f448977c233a2b023e56535fcd705e</id>
<content type='text'>
go get golang.org/x/tools@8f7fb01dd429 # CL 493619
go mod tidy
go mod vendor

The goal is to set up for importing the bisect command,
for use in tests, in a follow-up CL.

This also updates x/sys and x/net, including in std,
because x/tools now depends on newer versions of those.

Change-Id: I24c283cc165464d9c873ba7a9a4e75a9d02919b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/493596
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
go get golang.org/x/tools@8f7fb01dd429 # CL 493619
go mod tidy
go mod vendor

The goal is to set up for importing the bisect command,
for use in tests, in a follow-up CL.

This also updates x/sys and x/net, including in std,
because x/tools now depends on newer versions of those.

Change-Id: I24c283cc165464d9c873ba7a9a4e75a9d02919b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/493596
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/go: save checksums for go.mod files needed for go version lines</title>
<updated>2023-05-05T15:42:09+00:00</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-04-26T05:43:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=06fd1f30e92e0951b7a0d348221d968190da8888'/>
<id>06fd1f30e92e0951b7a0d348221d968190da8888</id>
<content type='text'>
When we load a package from a module, we need the go version line from
that module's go.mod file to know what language semantics to use for
the package. We need to save a checksum for the go.mod file even if
the module's requirements are pruned out of the module graph.
Previously, we were missing checksums for test dependencies of
packages in 'all' and packages passed to 'go get -t'.

This change preserves the existing bug for 'go mod tidy' in older
module versions, but fixes it for 'go mod tidy' in modules at go 1.21
or higher and for 'go get -t' at all versions.

Fixes #56222.

Change-Id: Icd6acce348907621ae0b02dbeac04fb180353dcf
Reviewed-on: https://go-review.googlesource.com/c/go/+/489075
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we load a package from a module, we need the go version line from
that module's go.mod file to know what language semantics to use for
the package. We need to save a checksum for the go.mod file even if
the module's requirements are pruned out of the module graph.
Previously, we were missing checksums for test dependencies of
packages in 'all' and packages passed to 'go get -t'.

This change preserves the existing bug for 'go mod tidy' in older
module versions, but fixes it for 'go mod tidy' in modules at go 1.21
or higher and for 'go get -t' at all versions.

Fixes #56222.

Change-Id: Icd6acce348907621ae0b02dbeac04fb180353dcf
Reviewed-on: https://go-review.googlesource.com/c/go/+/489075
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
