Skip to content

Rust: Remove unused extractor command-line options - #23054

Open
paldepind wants to merge 2 commits into
mainfrom
rust/extractor-cli-args
Open

paldepind wants to merge 2 commits into
mainfrom
rust/extractor-cli-args

Conversation

@paldepind

@paldepind paldepind commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Currently the Rust extractor supports passing all the environment variables that it supports as command line arguments. However, we don't make use of this capability, none of the other Rust extractors have, and it relies on a macro that makes things more complicated to understand.

This PR changes the extractor to only support the three command-line arguments that we make use of. This simplifies things and paves the way for further alignment with the other extractors.

@github-actions github-actions Bot added the Rust Pull requests that update Rust code label Nov 9, 2026
@paldepind paldepind changed the title Rust: simplify extractor command-line options Rust: Simplify extractor command-line option parsing Nov 9, 2026
@paldepind
paldepind force-pushed the rust/extractor-cli-args branch from e4f2b2b to 2430806 Compare November 9, 2026 13:05
@paldepind
paldepind force-pushed the rust/extractor-cli-args branch from 2430806 to 3a15812 Compare November 17, 2026 05:17
paldepind and others added 2 commits November 17, 2026 06:25
Replace the generated CLI configuration with explicit support for the
few command-line options that we actually use.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 03abd0ed-3880-4e39-8713-990a317c96e6
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 03abd0ed-3880-4e39-8713-990a317c96e6
@paldepind
paldepind force-pushed the rust/extractor-cli-args branch from 3a15812 to 8898397 Compare November 17, 2026 05:26
@paldepind paldepind changed the title Rust: Simplify extractor command-line option parsing Rust: Remove unused extractor command-line options Nov 17, 2026
@paldepind
paldepind marked this pull request as ready for review November 17, 2026 05:30
@paldepind
paldepind requested review from a team as code owners November 17, 2026 05:31
Copilot AI adaptive review requested due to automatic review settings November 17, 2026 05:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The change modifies public CLI/configuration precedence, removes a proc-macro, and regenerates shared Cargo/Bazel dependencies, requiring toolchain validation of runtime behavior, external invocations, and supported targets.

No open issues 🎉

What changed in this PR

This PR simplifies the Rust extractor configuration by replacing macro-generated command-line handling with an explicit CLI supporting only the three required options, while removing the obsolete proc-macro crate and unused dependency metadata.

Changes:

  • Adds explicit support for --file-list, --qltest, and --logging-verbosity.
  • Preserves environment and YAML deserialization for the remaining configuration fields.
  • Removes obsolete Cargo and Bazel dependencies and regenerates workspace metadata.
File Description
rust/​extractor/​src/​config.rs Defines the explicit three-option CLI and retains environment and YAML configuration handling.
rust/​extractor/​macros/​src/​lib.rs Removes the obsolete extractor configuration proc macro.
rust/​extractor/​macros/​Cargo.toml Removes the deleted proc-macro crate manifest.
rust/​extractor/​macros/​BUILD.bazel Removes Bazel targets for the deleted proc-macro crate.
rust/​extractor/​Cargo.toml Removes the macro and unused serde_with dependencies.
rust/​extractor/​BUILD.bazel Removes the extractor dependency on the deleted proc-macro crate.
MODULE.bazel Removes the unused serde_with 3.24.0 repository.
misc/​bazel/​3rdparty/​rust_workspace_deps/​serde_with/​BUILD.bazel Updates the generated serde_with alias to the remaining version.
misc/​bazel/​3rdparty/​rust_workspace_deps/​crates.bzl Regenerates workspace dependency and repository metadata.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.tinyvec-1.13.3.bazel Removes an unused generated transitive dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.serde_with-3.24.0.bazel Removes the obsolete serde_with 3.24.0 target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.serde_with_macros-3.24.0.bazel Removes the obsolete serde_with macro dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.schemars-1.2.2.bazel Removes an unused generated transitive dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.schemars-0.9.0.bazel Removes an unused generated transitive dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.ref-cast-impl-1.0.26.bazel Removes an unused generated proc-macro dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.ref-cast-1.0.26.bazel Removes an unused generated dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.portable-atomic-util-0.2.7.bazel Removes an unused generated platform dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.jiff-tzdb-platform-0.1.3.bazel Removes an unused generated timezone dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.jiff-tzdb-0.1.8.bazel Removes an unused generated timezone data target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.jiff-static-0.2.37.bazel Removes an unused generated dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.jiff-core-0.1.1.bazel Removes an unused generated Jiff core target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.jiff-0.2.37.bazel Removes an unused generated Jiff dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.indexmap-1.9.3.bazel Removes an unused generated IndexMap dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.hex-0.4.3.bazel Removes an unused generated hexadecimal dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.hashbrown-0.12.3.bazel Removes an unused generated hash map dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.dyn-clone-1.0.20.bazel Removes an unused generated cloning dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.defmt-parser-1.0.0.bazel Removes an unused generated logging dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.defmt-macros-1.1.1.bazel Removes an unused generated logging proc-macro target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.defmt-1.1.1.bazel Removes an unused generated logging dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.darling-0.24.1.bazel Removes an unused generated macro-support dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.darling_macro-0.24.1.bazel Removes an unused generated proc-macro support target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.darling_core-0.24.1.bazel Removes an unused generated macro-support dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.bs58-0.5.1.bazel Removes an unused generated encoding dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.bitflags-1.3.2.bazel Removes an unused generated dependency target.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.bazel Updates the shared generated serde_with alias.
misc/​bazel/​3rdparty/​rust_workspace_deps/​BUILD.base64-0.23.1.bazel Removes an unused generated encoding dependency target.
Cargo.toml Removes the deleted macro crate from workspace members.
Cargo.lock Regenerates the lockfile without the removed macro and transitive dependencies.

Review effort: Lite (adaptive)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants