bazel-contrib / bazel-contrib/rules_python

refactor: consolidate `_bazel.bzl` and remove semantics.bzl

Đang mở
#2,522 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Can Close?
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ả

This issue is to track work related to consolidating and cleaning up the code now that it's been moved out of Bazel itself. The main reason for this is to simplify the implementation. When the code was in Bazel itself, having separate files for Bazel and Google-internal pieces sense because carrying patches for the code was particularly hard. However, this ended up making the code somewhat complicated: (1) a "semantics" plugin object with quite a few "hooks" into various low-level steps and (2) the "hook points" have turned into a brittle API that make it hard to communicate state from one step to another.

Most low-hanging fruit has been cleaned up, the three main things remaining are:

1. [x] Merging `py_executable_bazel.bzl` into `py_executable.bzl`
2. [x] Merging `common_bazel.bzl` into `common.bzl`
3. [x] Removing `semantics.bzl`
4. [ ] Removing "binary semantics" and "library semantics"

Cleaning this up will probably expose some natural points of simplification in how things are implemented.

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

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

Hướng nghiên cứu

Xem lại checklist và phần công việc còn lại về ngữ nghĩa nhị phân và ngữ nghĩa thư viện trong issue. Sau đó, kiểm tra các tệp `_bazel.bzl`, `semantics.bzl`, `py_executable.bzl` và `common.bzl` được tham chiếu để hiểu những gì còn lại sau các merges đã hoàn tất. Công việc được xem là hoàn tất khi loại bỏ các lớp ngữ nghĩa đó và đơn giản hóa phần triển khai bị ảnh hưởng, không để phần dọn dẹp được theo dõi bị dang dở.

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

Đánh giá

Lĩnh vực
build-system
Loại issue
Tái cấu trúc
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
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
35/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.