bazel-contrib / bazel-contrib/rules_oci

v2.0.0 on Windows

Open
#714 6 comments 3 reactions 0 assignees View on GitHub
performance
Dominant language
Starlark
Stars
423
Forks
213
Avg merge
53m
Merged PRs (30d)
1

Description

I'm running into two problems trying to use rules_oci 2.0.0 on Windows.

1. It fails to download bsdtar, receiving a 404 code. This can be fixed by upgrading `aspect_bazel_lib`.
2. It fails to access zstd. It's pulling zstd out of `aspect_bazel_lib`, but that module doesn't support Windows for zstd.

A workaround for zstd would be appreciated if anyone has one. As things stand, I can't upgrade due to this problem on Windows, and I can't use the previous version due to a problem with MacOS (https://github.com/bazel-contrib/rules_oci/issues/509).

As an idea for a workaround, would it be possible for me to register a zstd toolchain in my own build files? I see that Meta provides an exe for Windows. It's in a zip file, but it seems like sufficient Bazel-fu should be able to turn that into a toolchain. It's beyond me, though.

For a real fix:

* Can zstd be optional? If you publish a 2.0.1 with optional zstd, that would allow me to upgrade on Windows.
* Perhaps use the official zstd module from Facebook? I don't know the trade offs, but it seems odd for rules_oci to pull in zstd from aspect_bazel_lib.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the bsdtar 404 and zstd access failures on Windows with rules_oci 2.0.0, then trace the dependencies through aspect_bazel_lib. Compare the proposed optional-zstd and registered Windows zstd toolchain approaches; done means rules_oci can be upgraded and used successfully on Windows.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.