Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: consolidate _bazel.bzl and remove semantics.bzl #2522

Open
2 of 4 tasks
rickeylev opened this issue Dec 23, 2024 · 0 comments
Open
2 of 4 tasks

refactor: consolidate _bazel.bzl and remove semantics.bzl #2522

rickeylev opened this issue Dec 23, 2024 · 0 comments

Comments

@rickeylev
Copy link
Collaborator

rickeylev commented Dec 23, 2024

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. Merging py_executable_bazel.bzl into py_executable.bzl
  2. Merging common_bazel.bzl into common.bzl
  3. 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.

github-merge-queue bot pushed a commit that referenced this issue Dec 23, 2024
This furthers the work of removing the artificial split of code that
stemmed from
when the implementation was part of Bazel itself. Summary of changes:

* Move most of `py_executable_bazel.bzl` into `py_executable.bzl`
* Move most of `common_bazel.bzl` into `common.bzl`
* Create `precompile.bzl` for the precompile helpers. This is to avoid a
  circular dependency between common.bzl and attributes.bzl.

Work towards #2522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant