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

Emit RunfilesGroupInfo in py_binary targets

Aperta
#3,757 18 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
build-system

Direzione di ricerca

Inizia leggendo le implementazioni delle regole py_library e py_binary e la semantica dei provider nel modulo Bazel rules_runfiles_group collegato. Definisci come vengono inoltrate e aggregate le dipendenze, quindi verifica che py_binary emetta gruppi per l’interprete e la libreria standard, oltre che per le dipendenze di terze parti, con test che coprano i provider e i metadati richiesti.

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

Descrizione

🚀 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.

Lingua principale
Starlark
Stelle
690
Fork
722
Merge medio
1g 55m
PR unite (30g)
38

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.