-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 unneeeded build info function in Identify #1378
Conversation
debug.ReadBuildInfo didn't work in Go 1.17 (ok was always false). In Go 1.18 is now suddenly works, and is failing the TestIDService test.
d879e5a
to
e05e52b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this changes the user agent, anyway around it?
I don't think it does, as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is meant for setting the user agent when included in a dependency of another go module (e.g., go-ipfs). For cases like that, I believe it actually works (I thought I tested it). I believe the correct fix is to check if bi.Main.Path
is empty.
(we should maybe document that...) |
That makes sense. And even better, we can now use the vcs infos that Go 1.18 makes accessible (see https://blog.carlmjohnson.net/post/2021/golang-118-minor-features/). I'll make another PR. |
There we go: #1381 |
I'm now sure if this is actually the correct fix, but it makes our tests pass with Go 1.18.
debug.ReadBuildInfo
didn't work in Go 1.17 (ok
was alwaysfalse
). In Go 1.18 is now suddenly works, and is failing the TestIDService test.