Skip to content
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

remove junk from go.sum #8364

Closed
wants to merge 2 commits into from
Closed

Conversation

gregwebs
Copy link
Contributor

@gregwebs gregwebs commented Nov 20, 2018

What problem does this PR solve?

In the transition to go modules some junk was added to tidb's dependencies. #8054
Code review pointed this out and also the fact that any of the dependencies may have changed from what they were pegged at, but these issues has not been addressed.

This PR just removes some obvious junk.

What is changed and how it works?

I deleted a couple weird things in the go.sum

Tests

If it compiles it should work.


This change is Reviewable

@zz-jason
Copy link
Member

@tiancaiamao PTAL

@zz-jason
Copy link
Member

/run-all-tests

@zz-jason
Copy link
Member

LGTM

@zz-jason zz-jason added status/LGT1 Indicates that a PR has LGTM 1. component/server type/enhancement The issue or PR belongs to an enhancement. labels Nov 20, 2018
@ngaut
Copy link
Member

ngaut commented Nov 20, 2018

LGTM

@tiancaiamao
Copy link
Contributor

go.sum is maintained by tools (go toolchain) automanically, that's not junk.
Remove the go.sum file, it still compiles. @gregwebs

@tiancaiamao
Copy link
Contributor

https://github.com/golang/go/wiki/Modules#should-i-commit-my-gosum-file-as-well-as-my-gomod-file

The go command maintains a cache of downloaded packages and computes
and records the cryptographic checksum of each package at download time.
In normal operation, the go command checks these pre-computed checksums
against the main module's go.sum file, instead of recomputing them on
each command invocation. The 'go mod verify' command checks that
the cached copies of module downloads still match both their recorded
checksums and the entries in go.sum.

And here:
https://www.reddit.com/r/golang/comments/97dxj1/should_i_add_the_gosum_file_to_the_repo_of_a/

We should just take care of the go.mod file. @gregwebs

@gregwebs
Copy link
Contributor Author

See in PD where this same thing happened: there were dependencies showing up that made no sense. Then the process was done more carefully and the dependencies were no longer there.

Unfortunately I don't have deep insight into the go mod process. The only thing I can say for certain is that airbrake was not a dependency before go modules and then showed up afterwards, and that we certainly don't use it. I run make or even go mod tidy it doesn't show up in go.sum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/server status/LGT1 Indicates that a PR has LGTM 1. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants