bazel-contrib / bazel-contrib/rules_python

A utility to generate "runfiles tree" for build actions

未关闭
#1,602 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
help wanted
主要语言
Starlark
星标
688
派生
721
平均合并
15 小时 7 分钟
30 天内合并 PR
76

描述

# 🚀 feature request

### Description

I'm wondering if there's a way to generate python runfiles in an action. This is probably a Bazel request but so far I've only really felt this pain for python as I try to write aspects that run on `py_library` targets but otherwise require a full runfiles tree.

The only issue I struggle to find a clean solution for is how to deal with generated files. Any library that contains generated files results in files being "missing" in the action bit in reality it hasn't been collapsed into a runfiles tree so other sources fail to import, for example.

### Describe the solution you'd like

I think if there's gonna be a `rules_python` specific implementation then it'd be natural to want to put this logic in python so it can run in the action and avoid impacting the analysis phase too much. Though I'm not sure how to handle environments like windows which do not run in a sandbox and would potentially litter the execroot or conflict with other running actions. Some utility in `rules_python` would be fantastic.

贡献指南

打开贡献指南

调研方向

该 issue 未指定任何文件、测试或实现入口。首先跟踪 Python runfiles、生成文件和 py_library aspects 在构建操作中的处理方式,然后调查 Windows execroot 和 sandbox 的约束。完成的标准应是确定一个 utility 设计,使生成文件可用,同时不会对分析阶段造成不必要的影响,也不会产生操作冲突。

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

评估

技术栈
python
领域
build-system
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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