Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#3,564 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
build-system

Direzione di ricerca

Inizia in python/private/py_runtime_rule.bzl alle righe 54-58, dove l'issue segnala come vengono gestiti i runfile dell'interprete. Traccia il modo in cui l'interprete e i file contribuiscono ai runfile, inclusi root_symlinks, e verifica che un py_runtime ermetico esponga quei link quando vengono eseguite azioni Python; l'issue non indica alcun test né reproducer.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🐞 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")
  
Lingua principale
Starlark
Stelle
690
Fork
722
Merge medio
1g 2h
PR unite (30g)
50

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bazel-contrib/rules_python

Tutte le issue di bazel-contrib/rules_python

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.