home tags events about login
one honk maybe more

benjojo posted 17 Jun 2026 15:37 +0000

How do these cloud SDKs get so huge (from my go mod cache)

$ du -h --max-depth=1 |& grep G
1.6G	./huaweicloud
1.5G	./oracle
3.8G	.

huaweicloud-sdk-go-v3@v0.1.187 is 239MB of _text_, text, This module is 50,000+ tiny (less than 8KB go files) that look like this: https://github.com/huaweicloud/huaweicloud-sdk-go-v3/blob/5b4358369ac2cc3cc8985b52bd2d7930d654a8b2/services/gaussdbforopengauss/v3/model/model_list_enhance_full_sql_statistics_request_body.go#L4

That's a staggering amount of (I assume/hope) automatically generated code. A true horror case of the compiler

cloc showing the single version of the module coming in at 1,919,603 lines of go code

benjojo replied 17 Jun 2026 15:40 +0000
in reply to: https://benjojo.co.uk/u/benjojo/h/3V3zStV92c4Y9M35Tp

The AWS SDK is like this too, I don't use AWS directly but it's SDK finds it way into the import path and adds a very cool 2MB of _compiled code_ to the binary, It stands out in the size report for being the only thing that is mostly autogen'd code and not embedded assets

A "go size analyser" output, focused on the AWS package, where over 90% of the whole thing is a unhelpful "auto generated" area