Workbench · 5 MIN READ
Why a small module ZIP can still hit an import limit
The 4,000-file archive budget, the modernc.org/libc example and what a Setup failure actually means.
File count and byte size are different budgets
GopherForge checks downloaded modules before installing their source into a project. The current limits are 4,000 non-directory files per module ZIP, 96 MiB for the compressed download, 512 MiB uncompressed and 80 modules per automatic preparation pass.
The file count is taken from the raw archive before decompression, checksum comparison and platform or source selection. Tests, documentation and sources for other operating systems count even if they would later be discarded. It is not a count of the files your project eventually keeps, and it is not one total project-file limit.
The libc case
The official proxy archive for modernc.org/libc v1.75.3 contains 4,168 non-directory files. It exceeds the 4,000-file budget before compilation begins. That refusal is not a syntax error in your project and does not by itself mean device storage is full.
Retrying the same immutable archive cannot make its file count smaller. A network retry is useful for an interrupted transfer; it cannot bypass a deterministic archive budget. The application currently keeps this budget in place.
Choose a response that preserves compatibility
When the project’s requirements permit it, another compatible version or a smaller dependency may fit. Do not downgrade blindly: dependency API, security requirements and transitive versions still matter. A desktop Go environment may be the right place for a project outside the on-device constraints.
Passing archive checks is only one gate. The on-device WASI sandbox does not support cgo, native assembly or guest-program networking. Successfully downloading a module does not certify that every package in it can build or run in that environment. This case does not establish Memos or SQLite compatibility.
Why not remove the cap immediately?
An archive with many entries creates metadata, hashing and extraction work even when its compressed bytes are small. Raising the cap should be evaluated with representative modules, device memory measurements and cancellation behavior. A larger file budget alone is not proof of full dependency support.
Large archives already have a separate memory path: above 160 MiB uncompressed, entries can be hashed one at a time. A 48 MiB relevant-Go-source threshold can narrow source retention to an imported package and its in-module dependencies. That threshold is a selection trigger, not a guarantee of a final 48 MiB project.