Skip to content

oci_image: paths.relativize fails on Windows ARM64 in _maybe_wrap_launcher_for_windows #902

Description

@carlosmiguel84

Description

oci_image fails on Windows ARM64 with a path relativization error:

ERROR: Analysis of target '//apps/budget-tracker/src/Handlers:pipeline_image' failed
Error in fail: Path 'external/rules_oci+/oci/private/descriptor.sh' is not beneath 
'bazel-out/arm64_windows-fastbuild/bin/apps/budget-tracker/src/Handlers'

Root cause

oci/private/util.bzl:227 in _maybe_wrap_launcher_for_windows:

launcher = paths.relativize(bash_launcher.path, win_launcher.dirname)

On Windows ARM64, the bash launcher path (external/rules_oci+/oci/private/descriptor.sh) and the output directory (bazel-out/arm64_windows-fastbuild/bin/...) don't share a common prefix that bazel_skylib's paths.relativize can resolve.

Environment

  • rules_oci: 2.3.0
  • Bazel: 8.x
  • Host: Windows 11 ARM64
  • The same code works on Linux x86_64, Linux ARM64, macOS ARM64, and Windows x86_64.
  • Only Windows ARM64 (bazel-out/arm64_windows-fastbuild) is affected.

Workaround

None — oci_image can't be used on Windows ARM64 as of v2.3.0.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions