Skip to content

Use hermetic zipper tool in pkl_java_resource_jar#116

Merged
KushalP merged 2 commits intoapple:mainfrom
ByteSmithAI:fix_pkl_java_library2
Nov 6, 2025
Merged

Use hermetic zipper tool in pkl_java_resource_jar#116
KushalP merged 2 commits intoapple:mainfrom
ByteSmithAI:fix_pkl_java_library2

Conversation

@ByteSmithAI
Copy link
Copy Markdown
Contributor

Replace system zip/unzip commands with Bazel's hermetic zipper tool to ensure the rule works in remote build environments (RBE) where system commands may not be available.

The previous implementation used shell commands 'unzip' and 'zip' which caused "command not found" errors in RBE. This change uses @bazel_tools//tools/zip:zipper for both extraction and creation, making the build hermetic and portable.

Additionally, the implementation now properly strips the './' prefix from file paths using sed to avoid invalid ZIP entries that would cause "ZIP file can't be opened" errors.

Replace system zip/unzip commands with Bazel's hermetic zipper tool
to ensure the rule works in remote build environments (RBE) where
system commands may not be available.

The previous implementation used shell commands 'unzip' and 'zip'
which caused "command not found" errors in RBE. This change uses
@bazel_tools//tools/zip:zipper for both extraction and creation,
making the build hermetic and portable.

Additionally, the implementation now properly strips the './' prefix
from file paths using sed to avoid invalid ZIP entries that would
cause "ZIP file can't be opened" errors.
@KushalP KushalP merged commit cbabac6 into apple:main Nov 6, 2025
3 checks passed
@ByteSmithAI ByteSmithAI deleted the fix_pkl_java_library2 branch November 7, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants