Emit RunfilesGroupInfo in py_binary targets
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- build-system
调研方向
首先阅读已链接的 rules_runfiles_group Bazel 模块中的 py_library 和 py_binary 规则实现以及 provider 语义。定义依赖项如何被转发和聚合,然后验证 py_binary 是否会为解释器和标准库以及第三方依赖项生成组,并通过测试覆盖所请求的 provider 和元数据。
由索引模型根据 Issue 内容生成。
描述
🚀 feature request
Relevant Rules
I want py_binary to return an additional provider, RunfilesGroupInfo.
py_library could contribute by also returning this provider, but that's more of an implementation detail.
I'd be open to work on this if you agree that this is a good idea.
Description
I'd like to make packaging of py_binary targets in container images more efficient. To that end, I have designed a set of providers and described their semantics in a new Bazel module.
Describe the solution you'd like
py_library targets should forward RunfilesGroupInfo and RunfilesGroupMetadataInfo from their deps and add their own runfiles (srcs, data) to a group.
py_binary targets should aggregate runfiles groups from their deps and emit RunfilesGroupInfo and RunfilesGroupMetadataInfo that contain at least:
- A group for the interpreter + standard library
- One group per third party dependency
Additionally, it could also make sense to produce groups for each py_library target in the transitive dependency graph.
Describe alternatives you've considered
Doing nothing would mean we continue creating (very large) container image layers that contain the full runfiles tree of a py_binary target.
Writing custom packaging rules just for rules_python is unsustainable in my opinion.
- 主要语言
- Starlark
- 星标
- 690
- 派生
- 722
- 平均合并
- 1 天 55 分钟
- 30 天内合并 PR
- 38
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bazel-contrib/rules_python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
bazel-contrib/rules_python#4179 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
bazel-contrib/rules_python#4164 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
bazel-contrib/rules_python#3821 ·
-
难度 3/5 1-2 天 新手友好度 45/100
bazel-contrib/rules_python#4181 ·
-
Release 2.4.0 未关闭type: release
难度 4/5 3-5 天 新手友好度 25/100
bazel-contrib/rules_python#4175 · 3 条评论 ·
查看 bazel-contrib/rules_python 的全部 Issue
相似的 Issue
-
core dependencies
难度 1/5 1 小时以内 新手友好度 80/100
-
bug github_actions
难度 2/5 1-3 小时 新手友好度 75/100
registrystack/registry-stack#1393 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100