bazel-contrib / bazel-contrib/rules_python

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

Đang mở
#1,269 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
gazelle type: feature request
Ngôn ngữ chính
Starlark
Star
688
Fork
721
Merge trung bình
15 giờ 7 phút
Pull request đã merge (30 ngày)
76

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách đọc Gazelle Plugin và các rule liên quan được nêu trong issue, tập trung vào cách nó chọn rule cho library, test và binary. Công việc hoàn tất khi một annotation dành riêng cho scope có thể chọn các lựa chọn thay thế như py_image và pytest_test, trong khi Gazelle vẫn quản lý dependency cho các target đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
build-system
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
30/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.