-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std,cmd: add a unit test to ensure that src/go.mod and src/cmd/go.mod are in sync #36907
Comments
It's not wholly clear to me why we need to vendor golang.org/x/sys in two different places. |
See also #36852. |
@ianlancetaylor: We don't put |
@FiloSottile, note that the test described in #36852 requires network access (in order to download the pristine dependencies for comparison), while the test described here can (at least partially) be computed offline from the contents of |
Change https://golang.org/cl/217218 mentions this issue: |
Change https://golang.org/cl/217517 mentions this issue: |
This issue is currently labeled as early-in-cycle for Go 1.15. That time is now, so friendly ping. If it no longer needs to be done early in cycle, that label can be removed. |
Updates #36905 Updates #36907 Change-Id: I293dcef67800d5c81ff3a254bbd49309c5880710 Reviewed-on: https://go-review.googlesource.com/c/go/+/217517 Reviewed-by: Dmitri Shuralyov <[email protected]>
I'm very glad this test exists and found it to work well while developing CL 231657. Thank you @bcmills and @FiloSottile! Here's an excerpt from a moment when the x/sys versions diverged between the two modules; the test reported it correctly.
|
Change https://golang.org/cl/236600 mentions this issue: |
Previously, if there was a non-directory file with the name vendor or testdata in the Go source tree, it was possible for some directories to be skipped by filepath.Walk performed in findGorootModules. As unusual and unlikely as such non-directory files are, it's better to ensure all directories are visited, and all modules in the GOROOT source tree are found. This increases confidence that tests relying on findGorootModule will not have unexpected false negatives. For #36851. For #36907. Change-Id: I468e80d8f57119e2c72d546b3fd1e23c31fd6e6c Reviewed-on: https://go-review.googlesource.com/c/go/+/236600 Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
In #36851 (comment), @FiloSottile noticed that the
std
module and thecmd
module currently depend on different commits of thegolang.org/x/sys
module.We should prevent such skew in the future. It should be straightforward to write a test that uses
go list
(or a similar approach) to check that the versions required bystd
andcmd
agree for the modules in the intersection of their dependencies.The text was updated successfully, but these errors were encountered: