bazel-contrib / bazel-contrib/rules_python

Allow overriding the build rule gazelle uses for libraries/tests/binaries

オープン
#1,269 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
gazelle type: feature request
主要言語
Starlark
スター
688
フォーク
721
平均マージ
15時間 7分
マージ済み PR(30日)
76

説明

# 🚀 feature request

### Relevant Rules

Gazelle Plugin

### Description

There are two issues I'm running into:
1) Some of my binaries need to use `py_image` rather than `py_binary` but gazelle can't manage deps for `py_image`.
2) I have a custom macro called `pytest_test` that I use for my tests that use pytest but Gazelle generates a `py_test` target for those files. I have to manually ignore all of those files and then manually manage the target since the `py_test` rule can properly run them.

### Describe the solution you'd like

It would be great if there was a Gazelle annotation where, for the current scope, Gazelle could be configured to use a different rule for particular target types.

### Describe alternatives you've considered

The only workaround I know of is to instruct Gazelle to ignore the files and then manage the build targets manually.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず Gazelle Plugin と、issue で指定されている関連ルールを読み、ライブラリ、テスト、バイナリに対してどのようにルールを選択するかに注目します。scope 固有のアノテーションで py_image や pytest_test などの代替を選択でき、そのターゲットの依存関係を Gazelle が引き続き管理できれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。