Repository navigation
Closed
Closed
Copy link
Labels
P2Improve and finish existing featuresenhancementNew feature or requestmodel:sonnetAgent lane: scoped change with stated design, Sonnet
Description
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 bytools/docs/elixir/defs.bzl:34andtools/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(alsotools/docs/javascript/aspect.bzl:60),tools/docs/jvm/shard.bzl:74,tools/docs/rust/defs.bzl:118, and every*_shard_actionintools/docs/<lang>/defs.bzlplus the_extract/_<lang>_extractattrs in itsdefs.bzlandaspect.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 intools/docs/{go,powershell,protobuf,swift}/BUILD.bazel. cli/cli/src/multicall.rs,cli/cli/src/main.rs(run_as_tool),cli/cli/BUILD.bazel(dxdeps),tools/docs/ir/ir/src/tool.rs(main).
Fix
- Follow the first batch: each lib gets
pub fn run_process(args: &[String]) -> i32overdocumentation_ir::tool::run_process, getsvisibility = VIS_TOOLS_PUBLIC + ["//cli/cli:__pkg__"], and becomes aToolvariant whose subcommand is the old binary name. - Point the attrs at
@dx_prebuilt//:dxand add the subcommand as the first argument of the action. - Tests that ran the binary run dx with the subcommand.
- Delete
src/main.rs, therust_binaryand the[[bin]]entry, then repincargo-bazel-lock.jsonwithCARGO_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.rsand the lockfile.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
P2Improve and finish existing featuresenhancementNew feature or requestmodel:sonnetAgent lane: scoped change with stated design, Sonnet
Activity
docs: extractors and site tools run as dx subcommands; dx docs render…
docs: extractors and site tools run as dx subcommands; dx docs render…