Skip to content

api: extract elixir, erlang and ocaml defs.bzl into starlark.json (part of #13178) - #14005

Merged
TrapsterDK merged 1 commit into
mainfrom
cloud/13178
Nov 19, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
cloud/13178

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Pull Request

Linked Issue

Changes

  • dx_pins.archive gets a bzl_srcs attr. When it is set, the archive rule adds a public dx_bzl_srcs filegroup to each package that has .bzl files, and the root filegroup collects all of them. Set on rules_elixir, rules_erlang and rules_ocaml.
  • tools/api: elixir/defs.bzl, erlang/defs.bzl and ocaml/defs.bzl are now extracted (80 of 93 public files). New deps: the three @<repo>//:dx_bzl_srcs targets and @bazel_skylib//rules:copy_file.
  • patches/rules_ocaml/empty_glob.patch: ocaml/_rules failed to load because its ppx*.bzl globs match nothing and Bazel's default is allow_empty = False. The patch adds allow_empty = True. The upstream repo has been inactive since Mar 2025, so this is not filed upstream.
  • Regenerated api/starlark.json and docs/supported-surface.md. Besides the 3 new files and the new bzl_srcs tag attr, this also brings in drift already on main: new provider fields in capnproto, flatbuffers and thrift, and the removed //cli/hpc_coverage:hpc_coverage.

Verification

tools/dx check --apply on the touched files: exit 0. It also rewrote the root BUILD.bazel sort order; I reverted that.

Tested: //tools/api:api_test, //patches:headers_test, //patches:update_readme_test, //patches:upstream_unit_test, //ocaml/tests/runtime:all, //erlang/tests/runtime:all, //elixir/tests:all, //core/tests:all. All 55 tests passed. The three new //tools/api:doc_{elixir,erlang,ocaml}_defs extracts build.

Not run: --affected (cloud container, touched packages only) and the elixir conformance suite.

This touches MODULE.bazel, which is a review path, so the PR needs needs-review.


Generated by Claude Code

…rt of #13178, part of #13817)

dx_pins.archive gains bzl_srcs: the archive rule adds a public
dx_bzl_srcs filegroup to each package that holds .bzl files, and the
root one gathers them all, so starlark_doc_extract can follow loads into
rules_elixir, rules_erlang and rules_ocaml. A rules_ocaml patch lets
ocaml/_rules load under allow_empty = False. Regenerating the snapshot
also records provider fields that main had already changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyrMhpvYiaXtbch78d
@TrapsterDK TrapsterDK added needs-review Touches review paths; needs a second-session Review: comment train Tested; land via merge train api labels Nov 19, 2026 — with Claude
@TrapsterDK
TrapsterDK merged commit c7e1a1e into main Nov 19, 2026
4 of 5 checks passed
@TrapsterDK
TrapsterDK deleted the cloud/13178 branch November 19, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api needs-review Touches review paths; needs a second-session Review: comment train Tested; land via merge train

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants