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

what does (build ID mismatch) mean exactly? #11

Open
Dieterbe opened this issue Dec 11, 2016 · 1 comment
Open

what does (build ID mismatch) mean exactly? #11

Dieterbe opened this issue Dec 11, 2016 · 1 comment
Labels

Comments

@Dieterbe
Copy link

when I run binstale i'm getting a lot of (build ID mismatch) messages, but it's unclear what these mean.
I've been a fulltime go programmer for a few years but somehow never ran into this term, I presume I'm far from alone. Some quick google searching was also unfruitful, so I think it would be really useful if this program (or the documentation) was more clear and detailed.

thanks

@dmitshur
Copy link
Member

This is an external phrase that's coming from the Go build tool.

Try running:

go list -f '{{.ImportPath}} - {{.Stale}} - {{.StaleReason}}' github.com/something/stale

The way modern Go determines if a package is stale or not is by comparing a small build ID, a hash of sorts. If it doesn't match, that means something in the package has changed (the source code, set of files, build tags, etc.).

See its source:

https://github.com/golang/go/blob/ab5a2173f91c1e2779cdf49a2fc8a7abafecd5f1/src/cmd/go/pkg.go#L1484-L1495

StaleReason field was added in Go 1.7, so it's quite recent. See https://golang.org/doc/go1.7#cmd_go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants