Skip to content

ZIP files contain no directory entries #638

@guw

Description

@guw

Zip files produced by rules_pkg do not contain directory entries. For example, they look like this:

META-INF/MANIFEST.MF
xds/one.xsd
xds/two.xst

Although technically not required by the spec, a convention is to add directory entries to zip files (0 bytes, file name ending with /). A lot of tools seem to follow/implement this convention.

Expected:

META-INF/
META-INF/MANIFEST.MF
xds/
xds/one.xsd
xds/two.xst

Missing directory entries may cause issues with the Java ecosystem, which seems to heavily rely on the directory entries. For example, see this Spring Framework issue:
spring-projects/spring-framework#28230 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions