Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

py_runtime does not consume root_symlinks from the interpreter attr (hermetic toolchain)

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
build-system

调研方向

从 python/private/py_runtime_rule.bzl 的第 54-58 行开始,issue 在那里报告了解释器的 runfiles 是如何处理的。跟踪解释器和文件如何为 runfiles 作出贡献,包括 root_symlinks,并验证 hermetic 的 py_runtime 在执行 Python actions 时会公开这些链接;issue 没有指定测试或 reproducer。

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

描述

🐞 bug report

Affected Rule

py_runtime is affected.

For example

py_runtime(
    name = "hermetic_runtime",
    files = ["extracted_toolchain"],
    interpreter = "extracted_toolchain",
    interpreter_version_info = {
        "major": "3",
        "minor": "9",
        "micro": "21",
    },
    python_version = "PY3",
    visibility = ["//BazArTest/py_toolchain:__pkg__"],
)
Is this a regression?

No. It was discovered when upgrading to bazel 9.0.0, however, because @bazel_tools//tools/bash/runfiles is now an alias that uses root_symlinks.

Description

The py_runtime interpreter from the example makes use of runfiles.bash, but if it is only present in the Runfiles.root_symlinks of interpreter / files, then it does not exist in the runfiles directory when executing python actions.

You can see here:
https://github.com/bazel-contrib/rules_python/blob/393dcfd194615ab4d3393d29145842c186597e0e/python/private/py_runtime_rule.bzl#L54-L58

that it does not consider the root_symlinks in the interpreter runfiles.

🔬 Minimal Reproduction

It is pretty involved, so I'm hoping the description makes the issue readily apparent. I can work on a reproducer if that is not the case.

🌍 Your Environment

Operating System:

  
AlmaLinux 9.7 (Moss Jungle Cat)
  

Output of bazel version:

  
Bazelisk version: v1.26.0
INFO: Invocation ID: decd4a2d-e400-43ca-8558-5e818e7da8d1
Build label: 9.0.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Tue Jan 20 18:16:47 2026 (1768933007)
Build timestamp: 1768933007
Build timestamp as int: 1768933007
  

Rules_python version:

  
bazel_dep(name = "rules_python", version = "1.7.0")
  
主要语言
Starlark
星标
690
派生
722
平均合并
1 天 2 小时
30 天内合并 PR
50

贡献指南

打开贡献指南

从这里开始

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

bazel-contrib/rules_python 的其他 Issue

查看 bazel-contrib/rules_python 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

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