Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An unresolved minor finding notes that the configuration log omits the input-file count, making empty or partial extractions harder to diagnose.
1 open issue
What changed in this PR
This PR aligns the Rust extractor with other CodeQL extractors by replacing @argfile expansion with an explicit --file-list option.
Changes:
- Update both launchers and read input paths directly from a newline-separated file.
- Return QL test sources separately from configuration and remove input-specific macro handling.
- Remove
argfileand its unused transitive dependencies from Cargo and Bazel metadata.
| File | Description |
|---|---|
rust/tools/index-files.sh |
Pass the file list through --file-list. |
rust/tools/index-files.cmd |
Use --file-list in the Windows launcher. |
rust/extractor/src/qltest.rs |
Return source paths instead of mutating configuration. |
rust/extractor/src/main.rs |
Read input paths from the configured file list. |
rust/extractor/src/config.rs |
Replace positional inputs with a file-list option. |
rust/extractor/macros/src/lib.rs |
Remove special handling for input paths. |
rust/extractor/Cargo.toml |
Remove the argfile dependency. |
MODULE.bazel |
Remove the argfile repository import. |
misc/bazel/3rdparty/tree_sitter_extractors_deps/crates.bzl |
Remove unused dependency and repository definitions. |
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.os_str_bytes-7.2.0.bazel |
Delete unused transitive-dependency build metadata. |
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.fs-err-3.3.0.bazel |
Delete unused transitive-dependency build metadata. |
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel |
Remove argfile aliases. |
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.argfile-1.0.0.bazel |
Delete generated argfile build metadata. |
misc/bazel/3rdparty/tree_sitter_extractors_deps/argfile/BUILD.bazel |
Delete the unversioned dependency alias. |
misc/bazel/3rdparty/tree_sitter_extractors_deps/argfile-1.0.0/BUILD.bazel |
Delete the versioned dependency alias. |
Cargo.lock |
Remove argfile and its unused transitive dependencies. |
Review effort: Max
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 35193a30-9bd2-4372-a2e5-65422a7779cf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 35193a30-9bd2-4372-a2e5-65422a7779cf
paldepind
force-pushed
the
rust/remove-argfile
branch
from
October 28, 2026 14:36
38712e6 to
08eff93
Compare
argfile dependency and read file list manually
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The
index-files.shfile in the extractors for Ruby, Ql, and Unified all pass the filename with the list of files to extract like this--file-list "$1".However, in
index-files.shin the Rust extractor we pass it like@"$1". The@is syntax to pass arguments by filename (I'm not sure what the origin of this notation is, but it's a somewhat well-known notation). We handle the@by a dependency argfile.The only thing we gain from introducing this dependency, using
@(that I was not familiar with), deviating from the other extractors, and special casing in theextractor_cli_configmacro, is that we don't have to read the named file ourselves.I don't think that's worth it, so this PR removes the
argfiledependency and reads and parses the file manually (like the other extractors do). This gives closer alignment with the other extractors and less complexity. Furthermore, it turns out that, all things considered, this is in fact fewer lines of code than what we had with the dependency.The dependency removal and generated Cargo/Bazel metadata are in the first commit. The code changes are in the second commit.