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.
Description
oci_imagefails on Windows ARM64 with a path relativization error:Root cause
oci/private/util.bzl:227in_maybe_wrap_launcher_for_windows: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 thatbazel_skylib'spaths.relativizecan resolve.Environment
bazel-out/arm64_windows-fastbuild) is affected.Workaround
None —
oci_imagecan't be used on Windows ARM64 as of v2.3.0.