Coder Social home page Coder Social logo

zxilly / go-size-analyzer Goto Github PK

View Code? Open in Web Editor NEW
1.1K 4.0 22.0 3.24 MB

A tool for analyzing the size of compiled Go binaries, offering cross-platform support, detailed breakdowns, and multiple output formats.

Home Page: https://gsa.zxilly.dev/

License: GNU Affero General Public License v3.0

Go 56.24% Python 14.66% JavaScript 7.61% HTML 0.07% TypeScript 21.11% SCSS 0.32%
binary golang symbol visualization analyzer dependency terminal-ui treemap go react

go-size-analyzer's Introduction

go-size-analyzer's People

Contributors

ccoveille avatar cristaloleg avatar dependabot[bot] avatar fossabot avatar ldemailly avatar nikolaydubina avatar step-security-bot avatar zxilly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-size-analyzer's Issues

Implementing a reproducible diff interface

Any thoughts on how to do a diff between to binaries

Basically I want to compare improvements (or degradation) over time for a binary
(or differences between 2)

ideally it'd tell me

  • new sections
  • removed sections
  • % change in same sections

1.5.2 release build failure

seeing some release build failure in Homebrew/homebrew-core#177777

# github.com/Zxilly/go-size-analyzer/internal
internal/analyze.go:47:20: k.UpdateVersionFlag undefined (type *knowninfo.KnownInfo has no field or method UpdateVersionFlag)

also, might not be a good idea to use rc release for release binary shipping?

About alternative

Hi @Zxilly

I saw your starred @bradfitz https://github.com/bradfitz/shotizam

Can you explain how they differ and how they are close, except the rendering format. I'm more interested in the way to analyze things.

Was shotizam a part of your inspirations, or you just found it out?

Were there other projects that existed before and that inspired you ?

Would you consider to add a mention about alternatives to your Readme file.

Thanks, Christophe

failed to find runtime.text symbol: moduledata structure not found

On darwin arm64 I'm getting the following message:

gsa --verbose ./bin/manager
level=INFO msg="Loading sections..."
level=INFO msg="Loading sections done"
level=INFO msg="Loading packages..."
level=ERROR msg="Error: failed to find runtime.text symbol: moduledata structure not found"
go version -m ./bin/manager
bin/manager: go1.22.2
	path	command-line-arguments
	dep	dario.cat/mergo	v1.0.0	h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
	dep	github.com/Kong/go-diff	v1.2.2	h1:KKKaqHc8IxuguFVIZMNt3bi6YuC/t9r7BGD8bOOpSgM=
	dep	github.com/Kong/gojsondiff	v1.3.2	h1:qIOVq2mUXt+NXy8Be5gRUee9TP3Ve0MbQSafg9bXKZE=
	dep	github.com/adrg/strutil	v0.3.0	h1:bi/HB2zQbDihC8lxvATDTDzkT4bG7PATtVnDYp5rvq4=
	dep	github.com/avast/retry-go/v4	v4.6.0	h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA=
	dep	github.com/beorn7/perks	v1.0.1	h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
	dep	github.com/blang/semver/v4	v4.0.0	h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
	dep	github.com/bombsimon/logrusr/v3	v3.1.0	h1:zORbLM943D+hDMGgyjMhSAz/iDz86ZV72qaak/CA0zQ=
	dep	github.com/cenkalti/backoff/v4	v4.3.0	h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
	dep	github.com/cespare/xxhash/v2	v2.2.0	h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
	dep	github.com/davecgh/go-spew	v1.1.2-0.20180830191138-d8f796af33cc	h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
	dep	github.com/emicklei/go-restful/v3	v3.11.2	h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU=
	dep	github.com/evanphx/json-patch/v5	v5.9.0	h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
	dep	github.com/fatih/color	v1.16.0	h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
	dep	github.com/fsnotify/fsnotify	v1.7.0	h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
	dep	github.com/gammazero/deque	v0.2.0	h1:SkieyNB4bg2/uZZLxvya0Pq6diUlwx7m2TeT7GAIWaA=
	dep	github.com/gammazero/workerpool	v1.1.3	h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q=
	dep	github.com/go-logr/logr	v1.4.1	h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
	dep	github.com/go-logr/zapr	v1.3.0	h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
	dep	github.com/go-openapi/jsonpointer	v0.20.2	h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q=
	dep	github.com/go-openapi/jsonreference	v0.20.4	h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU=
	dep	github.com/go-openapi/swag	v0.22.7	h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8=
	dep	github.com/goccy/go-json	v0.10.2	h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
	dep	github.com/gogo/protobuf	v1.3.2	h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
	dep	github.com/golang/groupcache	v0.0.0-20210331224755-41bb18bfe9da	h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
	dep	github.com/golang/protobuf	v1.5.4	h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
	dep	github.com/google/gnostic-models	v0.6.8	h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
	dep	github.com/google/go-cmp	v0.6.0	h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
	dep	github.com/google/go-querystring	v1.1.0	h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
	dep	github.com/google/gofuzz	v1.2.0	h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
	dep	github.com/google/uuid	v1.6.0	h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
	dep	github.com/hashicorp/go-cleanhttp	v0.5.2	h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
	dep	github.com/hashicorp/go-immutable-radix	v1.3.1	h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
	dep	github.com/hashicorp/go-memdb	v1.3.4	h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c=
	dep	github.com/hashicorp/go-retryablehttp	v0.7.5	h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
	dep	github.com/hashicorp/golang-lru	v1.0.2	h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
	dep	github.com/hexops/gotextdiff	v1.0.3	h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
	dep	github.com/imdario/mergo	v0.3.16	h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
	dep	github.com/josharian/intern	v1.0.0	h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
	dep	github.com/jpillora/backoff	v1.0.0	h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
	dep	github.com/json-iterator/go	v1.1.12	h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
	dep	github.com/kong/go-database-reconciler	v1.10.0	h1:502Nn7CTsUNZyClL5bjrhkFrendVrPxDkP4ZGlBfsdg=
	dep	github.com/kong/go-kong	v0.54.0	h1:HZkZJRREJs/azkgJxMWr2jANQQfg8xXsAiFKu+d1nrs=
	dep	github.com/kong/kubernetes-ingress-controller/v3	(devel)	
	dep	github.com/kong/kubernetes-telemetry	v0.1.3	h1:Hz2tkHGIIUqbn1x46QRDmmNjbEtJyxyOvHSPne3uPto=
	dep	github.com/kong/semver/v4	v4.0.1	h1:DIcNR8W3gfx0KabFBADPalxxsp+q/5COwIFkkhrFQ2Y=
	dep	github.com/liggitt/tabwriter	v0.0.0-20181228230101-89fcab3d43de	h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
	dep	github.com/mailru/easyjson	v0.7.7	h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
	dep	github.com/mattn/go-colorable	v0.1.13	h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
	dep	github.com/mattn/go-isatty	v0.0.20	h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
	dep	github.com/mitchellh/mapstructure	v1.5.0	h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
	dep	github.com/moby/term	v0.5.0	h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
	dep	github.com/modern-go/concurrent	v0.0.0-20180306012644-bacd9c7ef1dd	h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
	dep	github.com/modern-go/reflect2	v1.0.2	h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
	dep	github.com/munnerz/goautoneg	v0.0.0-20191010083416-a7dc8b61c822	h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
	dep	github.com/pkg/errors	v0.9.1	h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
	dep	github.com/prometheus/client_golang	v1.19.0	h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
	dep	github.com/prometheus/client_model	v0.6.0	h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos=
	dep	github.com/prometheus/common	v0.53.0	h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE=
	dep	github.com/prometheus/procfs	v0.12.0	h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
	dep	github.com/puzpuzpuz/xsync/v2	v2.5.1	h1:mVGYAvzDSu52+zaGyNjC+24Xw2bQi3kTr4QJ6N9pIIU=
	dep	github.com/samber/lo	v1.39.0	h1:4gTz1wUhNYLhFSKl6O+8peW0v2F4BCY034GRpU9WnuA=
	dep	github.com/samber/mo	v1.11.0	h1:ZOiSkrGGpNhVv/1dxP02risztdMTIwE8KSW9OG4k5bY=
	dep	github.com/shirou/gopsutil/v3	v3.24.3	h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE=
	dep	github.com/shoenig/go-m1cpu	v0.1.6	h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
	dep	github.com/sirupsen/logrus	v1.9.3	h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
	dep	github.com/sourcegraph/conc	v0.3.0	h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
	dep	github.com/spf13/cobra	v1.8.0	h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
	dep	github.com/spf13/pflag	v1.0.5	h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
	dep	github.com/ssgelm/cookiejarparser	v1.0.1	h1:cRdXauUbOTFzTPJFaeiWbHnQ+tRGlpKKzvIK9PUekE4=
	dep	github.com/tidwall/gjson	v1.17.1	h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U=
	dep	github.com/tidwall/match	v1.1.1	h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
	dep	github.com/tidwall/pretty	v1.2.1	h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
	dep	github.com/tklauser/go-sysconf	v0.3.12	h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
	dep	github.com/xeipuuv/gojsonpointer	v0.0.0-20190905194746-02993c407bfb	h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
	dep	github.com/xeipuuv/gojsonreference	v0.0.0-20180127040603-bd5ef7bd5415	h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
	dep	github.com/xeipuuv/gojsonschema	v1.2.0	h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
	dep	github.com/yudai/golcs	v0.0.0-20170316035057-ecda9a501e82	h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M=
	dep	go.uber.org/multierr	v1.11.0	h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
	dep	go.uber.org/zap	v1.27.0	h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
	dep	golang.org/x/exp	v0.0.0-20231226003508-02704c960a9b	h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
	dep	golang.org/x/net	v0.24.0	h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
	dep	golang.org/x/oauth2	v0.19.0	h1:9+E/EZBCbTLNrbN35fHv/a/d/mOBatymz1zbtQrXpIg=
	dep	golang.org/x/sync	v0.7.0	h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
	dep	golang.org/x/sys	v0.19.0	h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
	dep	golang.org/x/term	v0.19.0	h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
	dep	golang.org/x/text	v0.14.0	h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
	dep	golang.org/x/time	v0.5.0	h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
	dep	gomodules.xyz/jsonpatch/v2	v2.4.0	h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=
	dep	google.golang.org/protobuf	v1.33.0	h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
	dep	gopkg.in/inf.v0	v0.9.1	h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
	dep	gopkg.in/yaml.v2	v2.4.0	h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
	dep	gopkg.in/yaml.v3	v3.0.1	h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
	dep	k8s.io/api	v0.29.4	h1:WEnF/XdxuCxdG3ayHNRR8yH3cI1B/llkWBma6bq4R3w=
	dep	k8s.io/apiextensions-apiserver	v0.29.3	h1:9HF+EtZaVpFjStakF4yVufnXGPRppWFEQ87qnO91YeI=
	dep	k8s.io/apimachinery	v0.29.4	h1:RaFdJiDmuKs/8cm1M6Dh1Kvyh59YQFDcFuFTSmXes6Q=
	dep	k8s.io/cli-runtime	v0.29.4	h1:QvUrddBxVX6XFJ6z64cGpEk7e4bQduKweqbqq+qBd9g=
	dep	k8s.io/client-go	v0.29.4	h1:79ytIedxVfyXV8rpH3jCBW0u+un0fxHDwX5F9K8dPR8=
	dep	k8s.io/component-base	v0.29.4	h1:xeKzuuHI/1tjleu5jycDAcYbhAxeGHCQBZUY2eRIkOo=
	dep	k8s.io/klog/v2	v2.120.0	h1:z+q5mfovBj1fKFxiRzsa2DsJLPIVMk/KFL81LMOfK+8=
	dep	k8s.io/kube-openapi	v0.0.0-20240105020646-a37d4de58910	h1:1Rp/XEKP5uxPs6QrsngEHAxBjaAR78iJRiJq5Fi7LSU=
	dep	k8s.io/utils	v0.0.0-20240102154912-e7106e64919e	h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
	dep	sigs.k8s.io/controller-runtime	v0.17.3	h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk=
	dep	sigs.k8s.io/gateway-api	v1.0.1-0.20240409212030-c57c131b49f8	h1:5oIx2TXIMN7ijoQuKsOFordYU1/pwq+Qi0nV1a8Lhi4=
	dep	sigs.k8s.io/json	v0.0.0-20221116044647-bc3834ca7abd	h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
	dep	sigs.k8s.io/structured-merge-diff/v4	v4.4.1	h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
	dep	sigs.k8s.io/yaml	v1.4.0	h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
	build	-buildmode=exe
	build	-compiler=gc
	build	-ldflags="-s -w -X github.com/kong/kubernetes-ingress-controller/v3/internal/manager/metadata.Release=v3.1.0-224-gb01456169 -X github.com/kong/kubernetes-ingress-controller/v3/internal/manager/metadata.Commit=b01456169 -X github.com/kong/kubernetes-ingress-controller/v3/internal/manager/[email protected]:Kong/kubernetes-ingress-controller.git -X github.com/kong/kubernetes-ingress-controller/v3/internal/manager/metadata.ProjectURL=github.com/kong/kubernetes-ingress-controller"
	build	CGO_ENABLED=1
	build	CGO_CFLAGS=
	build	CGO_CPPFLAGS=
	build	CGO_CXXFLAGS=
	build	CGO_LDFLAGS=
	build	GOARCH=arm64
	build	GOOS=darwin

Failure to analyze when the symbol table is disabled on darwin/arm64/go 1.22/cgo

Hi, thanks for this tool!

Steps to reproduce:

level=INFO msg="Parsing binary..."
level=INFO msg="Parsing binary done"
level=INFO msg="Finding build info..."
level=INFO msg="Build info found"
level=INFO msg="Loading sections..."
level=INFO msg="Loading sections done"
level=INFO msg="Loading packages..."
level=ERROR msg="Fatal error: failed to find runtime.text symbol: moduledata structure not found"

But if I add an environment variable CGO_ENABLED=0 to disable cgo, the analysis runs successfully.

OS: macos m1
Go: 1.22

Report is missing elements

I ran this for my tool tf-import-gen. The unstripped binary size is ~6.2 MB and i wanted to look into what was causing it.

What i did

  • Went into the folder where i have checkout my tf-import-gen repo
  • Ran command CGO_ENABLED=0 go build
  • Ran command gsa --web ./tf-import-gen
  • Opened the web report

What i saw

If you see in the below screenshot the "Package Size" is 2.81 MB but the largest bar within that "Vendor packages size" ~591 KB hence i am not sure where the mega bytes are going

Screenshot 1
image

Screenshot 2
image

Analyse .rodata/go:embed content

go:embed stores its data in .rodata section of the binary file.

I am not sure if it's possible to extract all of the content of .rodata but it would be useful to at least have some idea about embedded content.

As for example, lingua-go stores tremendous amounts of embeds, so .rodata will take up ~100Mb of the file.

Information on the exact data structure is rather sparse but it's somewhat simple because we know what does the embedding (it is https://pkg.go.dev/embed)

See also:

construct tree structure directly

I am a bit surprised you encoding your data into CSV and then back into treemap structures

might be better to construct treemap structure directly.

image

Starting without file path should raise different error

Right now, if you run gsa --help, you'll see that file argument marked as optional:

Usage:
  gsa [OPTIONS] [file]

However, if you actually launch it without providing a file, you get nondescript error:
level=ERROR msg="Error: open : no such file or directory"

Well, it's kinda says what is wrong, but it doesn't say how you fix it.

Essentially, an error comes from the fact that file is not optional and should be mandatory and invalid usage (without file name and possibly with multiple file inputs) should print usage instead

go-size-analyzer 1.3.0 regression test failure

👋 trying to build the latest release, but run into some test issue. The error log is as below:

error test log
$ gsa --verbose hello
time=1.397833ms level=INFO msg="Parsing binary..."
time=5.678167ms level=INFO msg="Parsing binary done"
time=5.700458ms level=INFO msg="Finding build info..."
time=5.875ms level=INFO msg="Build info found"
time=6.034333ms level=INFO msg="Loading sections..."
time=6.056958ms level=INFO msg="Loading sections done"
time=6.222208ms level=INFO msg="Loading packages..."
time=17.832042ms level=INFO msg="Loading packages done"
time=40.554917ms level=WARN msg="Failed to load DWARF var dwarf.Field{Attr:dwarf.AttrName, Val:\"runtime.startupRand\", Class:dwarf.ClassString}dwarf.Field{Attr:dwarf.AttrLocation, Val:[]uint8{0x3, 0x50, 0x1a, 0x14, 0x0, 0x1, 0x0, 0x0, 0x0}, Class:dwarf.ClassExprLoc}dwarf.Field{Attr:dwarf.AttrType, Val:0x7b3b7, Class:dwarf.ClassReference}dwarf.Field{Attr:dwarf.AttrExternal, Val:true, Class:dwarf.ClassFlag}: byte slice len(2370821947417) != cap(71830128058207)"
time=43.298917ms level=ERROR msg="Fatal error: addr 100001000 pos Pos: Addr: 0 CodeSize: 696c626174695f5f Type: data\nAddrPos: Addr: 0 CodeSize: 696c626174695f5f Type: data Pkg: runtime Function:  SourceType: symbol and Pos: Addr: 100001000 CodeSize: 70 Type: text\nAddrPos: Addr: 100001000 CodeSize: 70 Type: text Pkg:  Function: go:buildid SourceType: pclntab conflict"

relates to Homebrew/homebrew-core#174638

Add CI via GitHub actions

I'm thinking about adding something that will launch go test and golangci-lint to validate no regression are added and code quality is preserved

`go install` support

Don't use go install, because gsa uses modded dependencies and replace directive was not allowed by go install.

Installation is a little annoying since I prefer using go install to automatically set up my path. Why do you need to use the replace directive? Can't you just point the go.mod to your modded modules directly instead?

For example:

github.com/dghubble/trie v0.1.0

Could just be replaced with github.com/ZxillyFork/trie v0.0.0-20240428062955-77f35217e179 directly in require instead of using replace. You typically only want to use replace if you're testing a fork to a repo that you want to PR imo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.