Add examples for using zipper/singlejar on rules that output unpredictable files

未关闭
#109 2 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
停滞
技术栈
java
领域
build-system

调研方向

先查看 issue 中关于 zipper、singlejar 和 java_toolchains 的讨论,然后检查现有的 Bazel 示例,寻找构建归档文件的模式。完成标准是添加可运行的示例,展示如何使用这两个工具将不可预测的规则输出收集到 zip 或 jar 中,包括特定于平台的 singlejar 设置。

由索引模型根据 Issue 内容生成。

描述

Sometimes builds need to incorporate programs that output unpredictable files in order to create artifacts. For example, a multi-language code generator. If those artifacts need to be collected into a single archive, like a zip or jar, then it's not at all clear how to proceed. Bazel has two tools, zipper and singlejar, that can be used to create zip and jar archives. But the zipper tool requires every file explicitly enumerated, so it can't be used on a group of rule outputs that are unknown in number and name. And singlejar could presumably be used, but it's not clear how to operate it, because java_toolchains don't participate in toolchain resolution and there are multiple platform-specific versions of singlejar, so it's not clear how to get it working.

Examples of using both of these would be welcome.

主要语言
Starlark
星标
958
派生
582
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bazelbuild/examples 的其他 Issue

查看 bazelbuild/examples 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。