Hive
fix(graph): encode rustc response file args
GitHub issue · Closed
What changed
This adds a rustc-response argument-file format to cmd_args and teaches the executor to encode those files for the host before writing them. The Rust target kind now keeps feature flags as normal rustc arguments such as feature="default", then asks the materializer for the rustc-response format when Windows needs a response file.
The change also updates the Starlark module reference and adds coverage for the generic cmd_args format, Windows response-file encoding, and the generated Rust feature response file.
Why
The main release workflow is still failing in the Windows release packaging jobs. The previous fix made feature values valid as direct rustc arguments, but response-file parsing on Windows consumed the raw string delimiter quotes before rustc validated --cfg.
Root cause
The failed jobs reached cargo_dependencies_x86_64_pc_windows_msvc/anyhow-1.0.102:rustc and reported feature=r#default#. That means the response file contained a value that looked valid as a direct Rust string literal, but Windows response-file parsing removed the double quotes inside it.
Approach
This keeps the rule authoring surface ergonomic. Target kinds declare the arguments they intend rustc to receive, and the executor owns the format-specific response-file encoding. line-delimited remains a literal format, while rustc-response applies the host-specific escaping needed by rustc @path files.
Impact
Rule authors do not need to know how to escape rustc response files for Windows. Existing direct rustc invocations stay unchanged, and Windows response files now preserve feature values with quoted string literals.
Validation
mise exec -- cargo test -p once-frontend --test prelude prelude_cargo_metadata_windows_features_escape_response_file_cfgsmise exec -- cargo test -p once-frontend --test prelude prelude_rust_windows_feature_cfgs_use_response_filemise exec -- cargo test -p once-frontend run_action_flattens_cmd_args_with_rustc_response_arg_filemise exec -- cargo test -p once-cli rustc_response_args_escape_quotes_for_windows_hostsmise exec -- cargo test -p once-cli commands::graph::analysis::actions::tests::rustc_response_args_escape_windows_shell_charactersmise exec -- cargo test -p once-cli commands::graph::analysis::actions::testsmise exec -- cargo test -p once-frontend --test preludemise exec -- cargo test -p once-frontendmise exec -- cargo test -p once-climise exec -- cargo fmt --all -- --checkgit diff --checkmise exec -- cargo clippy -p once-cli -p once-frontend --all-targets -- -D warningsmise exec -- cargo test --workspacemise exec -- cargo clippy --workspace --all-targets -- -D warnings
Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.
Start a Flight and preserve its objective, outcome, and session here.
No GitHub comments yet.