Skip to content

deploy: pypi.rs does not compile against zip 9.1.2 (name_for_index), release cells fail #6859

Closed

Description

@TrapsterDK

Found by the fork dry run (#4862, #6806): run https://github.com/TrapsterDK/rules_dx-forktest/actions/runs/41944728549 (tag v0.0.0-forktest.2 on origin/main 06baf51). The linux-x86_64, linux-arm64, macos-arm64 and windows-arm64 cells all fail in "Build the archive twice and qualify it", so attest, verify and upload are still not reached.

Where: deploy/rules/src/pypi.rs:78, introduced by #6789.

error[E0631]: type mismatch in function arguments
78 |  .filter_map(|index| archive.name_for_index(index).map(str::to_owned))
   = note: expected function signature `fn(Result<Cow<'_, str>, ZipError>) -> _`
              found function signature `fn(&str) -> _`

Cause: in zip 9.1.2 (pinned in cargo-bazel-lock.json), ZipArchive::name_for_index returns Option<ZipResult<Cow<'_, str>>>, not Option<&str>. //deploy/rules:dx_deploy_tools does not compile.

Fix: in deploy/rules/src/pypi.rs:78 use archive.name_for_index(index).and_then(|name| name.ok()).map(|name| name.into_owned()). Check any other name_for_index or by_index caller against zip 9.1.2. Add or keep a unit test that opens a wheel and finds .dist-info/RECORD. Verify with bazel build //deploy/rules:dx_deploy_tools.

Activity

  1. added
    P1
    model:sonnet
    on Nov 5, 2026
  2. TrapsterDK commented on Nov 5, 2026

    @TrapsterDK
    CollaboratorAuthor

    Fork dry run v0.0.0-forktest.2 from main 0eaedef: https://github.com/TrapsterDK/rules_dx-forktest/actions/runs/41948967911 (tag push) and https://github.com/TrapsterDK/rules_dx-forktest/actions/runs/41949020025 (release.yml dry_run=true approve=true). Windows/macOS/Linux consumer fixes held; all five cells now fail at one error, E0631 in deploy/rules/src/pypi.rs:78 (zip name_for_index), tracked in #6859. verify/attest/dry-run/source/pins/assets were skipped. Fork release and tag deleted. Re-run after #6859 lands.

  3. added a commit that references this issue on Nov 5, 2026
    6680f56
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

    P1model:sonnet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions