-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
78MB hugo binary is full of paths and urls #12406
Comments
It stores the dependency information which I guess can explain some of the bove. |
Sounds more like an issue to be filed in https://github.com/golang/go (if at all) |
I'm closing this, this needs to be improve upstream. If there are some build flags that I dont't know of that could improve this, please open a PR with changes in: https://github.com/gohugoio/hugo/blob/master/hugoreleaser.toml |
Seems like the dependency/module information isn't going away (see golang/go#50501 (comment)) but potentially the baked-in build paths can be cleaned up with the |
It appears there are 180 dependencies in the Hugo binary: $ strings -n 10 ./hugo | grep -i github | grep ^dep -c
180 Many of the other github.com instances in the binary might in fact be paths, so |
You’d get the count of built-in dependencies using # go version -m hugo | grep -e '^\s*dep' | wc -l
143 |
Hi, many thanks for Hugo (hugo v0.125.2-4e483f5d4abae136c4312d397a55e9e1d39148df linux/amd64 BuildDate=2024-04-20T15:29:44Z VendorInfo=gohugoio)
I just checked the binary version I downloaded from github, and it is huge. Furthermore, it contains 42181 github.com urls and thousands of long paths.
I wonder if "strip" is finding everything it needs to in the hugo binary release. Running strip myself does not decrease the binary size.
Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: