bazel-contrib / bazel-contrib/rules_python

A utility to generate "runfiles tree" for build actions

Ouverte
#1,602 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
help wanted
Langage dominant
Starlark
Étoiles
688
Forks
721
Merge moyen
15 h 7 min
PR mergées (30 j)
76

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

L’issue ne nomme aucun fichier, test ni point d’entrée de l’implémentation. Commencez par retracer la manière dont Python runfiles, les fichiers générés et les aspects py_library sont gérés dans les actions de build, puis étudiez les contraintes de l’execroot Windows et du sandbox. Le travail serait considéré comme terminé lorsqu’une conception définie d’un utilitaire permettrait de rendre les fichiers générés disponibles sans impact inutile sur la phase d’analyse ni conflits entre actions.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
build-system
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.