Skip to content

feat(rules): allow deriving custom rules from core rules #2666

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

Merged
merged 4 commits into from
Mar 16, 2025

Conversation

rickeylev
Copy link
Collaborator

@rickeylev rickeylev commented Mar 15, 2025

This exposes public functions for creating builders for py_binary, py_test, and py_library.
It also adds some docs and examples for how to use them.

I'm calling this a "volatile" API -- it's public, but the pieces that comprise
it (e.g. all the rule args, attributes, the attribute args, etc) are likely to change
in various ways, and not all modifications to them can be supported in a backward
compatible way. Hence the "volatile" term:

  • hold it gently and its fine
  • shake it a bit and its probably fine
  • shake it moderately and something may or may not blow up
  • shake it a lot and something will certainly blow up.

Work towards #1647

Verified

This commit was signed with the committer’s verified signature. The key has expired.
belimawr Tiago Queiroz
@rickeylev rickeylev requested a review from aignas as a code owner March 15, 2025 21:03
@rickeylev rickeylev force-pushed the feat.public.builders.api branch from bab485b to 153c26e Compare March 15, 2025 21:03

Verified

This commit was signed with the committer’s verified signature. The key has expired.
belimawr Tiago Queiroz

Verified

This commit was signed with the committer’s verified signature. The key has expired.
belimawr Tiago Queiroz

Verified

This commit was signed with the committer’s verified signature. The key has expired.
belimawr Tiago Queiroz
Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
@rickeylev rickeylev enabled auto-merge March 16, 2025 00:04
@rickeylev rickeylev added this pull request to the merge queue Mar 16, 2025
Merged via the queue into bazel-contrib:main with commit 20ac9bc Mar 16, 2025
4 checks passed
@rickeylev rickeylev deleted the feat.public.builders.api branch March 16, 2025 01:26
github-merge-queue bot pushed a commit that referenced this pull request Mar 20, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
belimawr Tiago Queiroz
PR #2666 forgot to add public load targets for the attr/rule builder
apis and associated
build targets for docs and bzl_library.

---------

Co-authored-by: Richard Levasseur <rlevasseur@google.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants