kezhenxu94 commented on pull request #18:
URL: 
https://github.com/apache/skywalking-satellite/pull/18#issuecomment-764448130


   According to [the 
doc](https://github.com/golang/go/wiki/Modules#why-does-go-mod-tidy-record-indirect-and-test-dependencies-in-my-gomod),
 `go mod tidy` should be consistent in all platforms:
   
   > go mod tidy also ensures your current go.mod reflects the dependency 
requirements for all possible combinations of OS, architecture, and build tags 
(as described here). In contrast, other commands like go build and go test only 
update go.mod to provide the packages imported by the requested packages under 
the current GOOS, GOARCH, and build tags (which is one reason go mod tidy might 
add requirements that were not added by go build or similar).
   
   I checked your issue in #10 , which is caused by the `packr` tool because it 
used `GO111MODULE=on` so that it modifies the `go.{mod,sum}` always when no 
`packr2` is installed (this happens on GitHub Action, but not on your local 
machine unless you remove `$(go env GOPATH)/bin/packr2`), we don't use it and 
thus I remove it here.
   
   Another problem is that you had `$(GO) mod tidy &> /dev/null`, causing the 
`go mod tidy` to run at background and the following command `git status -s` 
will detect nothing because `go mod tidy` has not finished yet (mostly because 
it cause some time), see 
[here](https://github.com/apache/skywalking-satellite/runs/1740240310) for the 
problem that was never detected before because of this .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to