Skip to content

prebuilt: remaining docs extractors run as dx subcommands (part of #13154) #13768

Closed

Description

@TrapsterDK

Part of #13154. The first docs batch moves avro, d, fortran, lua, perl and zig extractors onto dx <name>_extract. This issue covers the other 18.

Where

  • Extractors (lib + src/main.rs + Cargo.toml [[bin]]): tools/docs/{beam,cc,components,dart,dotnet,go,haskell,julia,ocaml,php,powershell,protobuf,python,ruby,rust,swift,typescript}/extract, tools/docs/jvm/convert.
  • Actions and attrs: tools/docs/beam/shard.bzl:69 (shared by tools/docs/elixir/defs.bzl:34 and tools/docs/erlang/defs.bzl:34), tools/docs/dotnet/shard.bzl:159 (two attrs, tools/docs/dotnet/defs.bzl:41,66), tools/docs/components/shard.bzl:29, tools/docs/python/shard.bzl:68, tools/docs/typescript/shard.bzl:37 (also tools/docs/javascript/aspect.bzl:60), tools/docs/jvm/shard.bzl:74, tools/docs/rust/defs.bzl:118, and every *_shard_action in tools/docs/<lang>/defs.bzl plus the _extract / _<lang>_extract attrs in its defs.bzl and aspect.bzl.
  • Tests that run a binary directly: tools/docs/rust/BUILD.bazel:43-49, tools/docs/ruby/BUILD.bazel:49-72, tools/docs/typescript/BUILD.bazel:28-35, and the $(rootpath ...) users in tools/docs/{go,powershell,protobuf,swift}/BUILD.bazel.
  • cli/cli/src/multicall.rs, cli/cli/src/main.rs (run_as_tool), cli/cli/BUILD.bazel (dx deps), tools/docs/ir/ir/src/tool.rs (main).

Fix

  • Follow the first batch: each lib gets pub fn run_process(args: &[String]) -> i32 over documentation_ir::tool::run_process, gets visibility = VIS_TOOLS_PUBLIC + ["//cli/cli:__pkg__"], and becomes a Tool variant whose subcommand is the old binary name.
  • Point the attrs at @dx_prebuilt//:dx and add the subcommand as the first argument of the action.
  • Tests that ran the binary run dx with the subcommand.
  • Delete src/main.rs, the rust_binary and the [[bin]] entry, then repin cargo-bazel-lock.json with CARGO_BAZEL_REPIN=workspace.
  • Once no binary calls documentation_ir::tool::main, delete it.
  • Land as 2 or 3 serial PRs of about 6 languages each, because they all touch multicall.rs and the lockfile.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

Activity

  1. added
    enhancement
    P2
    model:sonnet
    on Nov 19, 2026
  2. added 2 commits that reference this issue on Nov 19, 2026
    8b4f944
    ebf294d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancementmodel:sonnet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions