bazel-contrib / bazel-contrib/rules_python

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

未关闭
#2,522 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Can Close?
主要语言
Starlark
星标
688
派生
721
平均合并
15 小时 7 分钟
30 天内合并 PR
76

描述

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.

贡献指南

打开贡献指南

调研方向

检查 issue 中的清单以及剩余的二进制语义和库语义工作。然后检查所引用的 `_bazel.bzl`、`semantics.bzl`、`py_executable.bzl` 和 `common.bzl` 文件,以了解已完成的 merges 之后还剩下什么。完成的标准是移除这些语义层并简化受影响的实现,同时不让已跟踪的清理工作处于未完成状态。

由索引模型根据 Issue 内容生成。

评估

领域
build-system
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。