Skip to content

Wheel/zip and patch-archive size caps (64 MiB, 10,000 entries, 16 MiB per entry) are far below the jar limits and refuse packages with large compiled libraries #2197

Open

Description

Summary

Archive size limits differ a lot by format:

Reader Limits Where
jar members 200,000 entries, 64 MiB central directory, 1 GiB inflated crates/socket-patch-core/src/patch/jar_members.rs:79-83
wheel / zip verification (vendored) 10,000 entries, 64 MiB inflated crates/socket-patch-core/src/vendor/verify.rs:44-45
patch package / diff archives (tgz) 64 MiB total, 16 MiB per entry crates/socket-patch-core/src/patch/package.rs:20-25

Why this matters

Wheels with compiled extensions and NuGet packages pass these limits easily. Examples from PyPI: a single extension in py-rattler 0.23.2 is 59.7 MB, in headroom-ai 0.34.0 19.8 MB; pycryptodome ships 34 extensions in one wheel. A patched wheel or a patch package holding such a library is refused where a jar of the same size is accepted.

Suggested direction

Give the wheel/zip and tgz readers the same kind of budget the jar reader got (an inflated-bytes cap with a compression-ratio floor), or one shared limit type. When a cap is hit, say which limit and by how much in the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions