Build tags for smaller binaries that don't need net/http or encoding/json#63
Merged
Build tags for smaller binaries that don't need net/http or encoding/json#63
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #63 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 6 +2
Lines 550 612 +62
=========================================
+ Hits 550 612 +62 ☔ View full report in Codecov by Sentry. |
Member
Author
|
Didn't readily figure out how to get codecov read the coverage*.out but gave up for now - also fortio/workflows#2 (comment) might have to bite the bullet on the token thing as the coverage action keeps silently failing But this is good to go now (I think) and will propagate in fortio/cli (main objective for small binaries) and fortio/scli |
ccoVeille
approved these changes
Jun 30, 2024
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
…o print 1 character as one would most likely expect
ccoVeille
reviewed
Jul 1, 2024
ccoVeille
approved these changes
Jul 1, 2024
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
ldemailly
commented
Jul 1, 2024
ccoVeille
approved these changes
Jul 1, 2024
ccoVeille
requested changes
Jul 1, 2024
… makefile specific/local (GO_BIN) - tweaked the make all target
ccoVeille
approved these changes
Jul 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discovered through the excellent https://github.com/Zxilly/go-size-analyzer that
even without any logging of http, binaries included vendor/golang.org/x/net/http/httpproxy
it's because of net/http's init and the linker not being smart enough to elide that:
httpproxy.FromEnvironment().ProxyFunc() is called by envProxyFunc
envProxyFunc is called by http.ProxyFromEnvironment (already an exported function)
http.ProxyFromEnvironment is called while setting up http.DefaultTransport, which is an exported package variable
(credit @CarsonHoffman for the analysis)
Also for the records,
lets you see dependencies (which
go mod whydoesn't)