Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Emit RunfilesGroupInfo in py_binary targets

Đang mở
#3,757 18 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

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

Hướng nghiên cứu

Bắt đầu bằng cách đọc các triển khai quy tắc py_library và py_binary cùng ngữ nghĩa của provider trong mô-đun Bazel rules_runfiles_group được liên kết. Xác định cách các dependency được chuyển tiếp và tổng hợp, sau đó xác minh rằng py_binary phát ra các nhóm cho trình thông dịch và thư viện chuẩn, cùng với các dependency của bên thứ ba, với các bài kiểm thử bao quát các provider và metadata được yêu cầu.

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

Mô tả

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

Ngôn ngữ chính
Starlark
Star
690
Fork
722
Merge trung bình
1 ngày 55 phút
Pull request đã merge (30 ngày)
38

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bazel-contrib/rules_python

Tất cả issue của bazel-contrib/rules_python

Issue tương tự

Thêm issue về Build System

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.