Skip to content

Make subprocess stderr routing an explicit policy (#340) - #553

Draft
leynos wants to merge 7 commits into
mainfrom
issue-340-make-subprocess-stderr-routing-an-explicit-policy
Draft

Make subprocess stderr routing an explicit policy (#340)#553
leynos wants to merge 7 commits into
mainfrom
issue-340-make-subprocess-stderr-routing-an-explicit-policy

Conversation

@leynos

@leynos leynos commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #340

diag_json is an output-format decision, but the process layer treated it as a
transport policy: suppress_stderr: bool was derived inside the process seam
from request.cli.json and threaded through the subprocess execution chain,
leaking reporting semantics into subprocess handling.

This change introduces an explicit StderrMode { Forward, Suppress } policy
type in src/runner/process/stderr_mode.rs. The runner derives the policy from
CLI state via StderrMode::from_cli(cli) and carries it as a stderr_mode
field on NinjaBuildRequest/NinjaToolRequest, following the existing
env: &CommandEnv field precedent. The process layer only consumes the
policy and no longer reads cli.json directly.

Behaviour is unchanged: StderrMode::Suppress still drains both child stdout
and child stderr to io::sink() so JSON diagnostics stay machine-readable,
and the structured tracing field keeps its stable suppress_stderr name.
The JSON diagnostics BDD feature, tests/logging_stderr/json.rs, and the
progress_output feature all pass without edits.

Acceptance criteria

  • Process execution code no longer reads CLI JSON state directly.
  • Stderr forwarding/suppression is represented by a named policy type.
  • JSON diagnostics still keep stderr machine-readable.
  • make check-fmt, make lint, and make test pass.

Testing

  • make check-fmt: pass
  • make lint: pass (rustdoc, Clippy, and Whitaker Dylint clean)
  • make test: pass (1917 nextest tests, doctests)
  • CodeRabbit review: 0 findings

References

🤖 Generated with Claude Code

Summary by Sourcery

Introduce an explicit stderr routing policy for Ninja subprocesses and thread it through runner requests instead of deriving suppression directly from CLI JSON settings.

Enhancements:

  • Add a StderrMode policy type to control forwarding vs suppression of child stdout/stderr and derive it from CLI configuration.
  • Extend NinjaBuildRequest and NinjaToolRequest to carry stderr_mode, updating runner, process, and logging code to consume this policy field.
  • Adjust developer documentation to describe the new stderr policy, its tracing field derivation, and its relationship to CommandEnv.
  • Update tests and examples to construct requests with StderrMode::from_cli while preserving existing behaviour of JSON diagnostics and environment handling.

Documentation:

  • Document the stderr routing policy, its impact on structured logging fields, and how runner requests now include stderr_mode alongside CommandEnv.

Tests:

  • Add unit tests for StderrMode policy derivation and update existing integration/UI tests to use the new stderr_mode field in runner requests.

leynos and others added 2 commits August 9, 2026 19:34
Replace the bare `suppress_stderr: bool` threaded through the Ninja
subprocess chain with an explicit `StderrMode { Forward, Suppress }`
policy. The runner now derives the policy from CLI state via
`StderrMode::from_cli(cli)` and carries it as a `stderr_mode` field on
`NinjaBuildRequest`/`NinjaToolRequest`, following the `env: &CommandEnv`
precedent. The process layer consumes the field and no longer reads
`request.cli.json` directly, so the JSON output-format decision no longer
leaks into subprocess transport handling.

The structured `tracing` field keeps its stable `suppress_stderr` name,
now valued from `stderr_mode.is_suppress()`, so log consumers are
unaffected. `Suppress` still drains both child stdout and stderr to
`io::sink()` to keep JSON diagnostics machine-readable.

Closes #340.

Co-Authored-By: Claude <noreply@anthropic.com>
The StderrMode refactor pushed src/runner/process/mod.rs to 407 lines,
over the Whitaker module_max_lines limit of 400. Fold each
StderrMode::Suppress/Forward match arm onto a single line so the module
sits at 395 lines without changing behaviour.

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5121f498-b692-44bd-a72f-e872332793fd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary

  • Introduce StderrMode { Forward, Suppress } for explicit subprocess stream routing.
  • Derive the policy from CLI state before execution.
  • Pass StderrMode through NinjaBuildRequest and NinjaToolRequest.
  • Keep process execution independent of CLI JSON state.
  • Preserve machine-readable JSON diagnostics by draining suppressed stdout and stderr.
  • Retain the suppress_stderr tracing field.
  • Update documentation, tests, and request construction for issue #340.

Validation

  • make check-fmt
  • make lint
  • make test
  • 1,917 nextest tests and doctests passed.

Walkthrough

The runner now derives an explicit StderrMode policy from CLI state. Ninja requests carry the policy. Process execution and command logging consume it without reading CLI JSON state directly.

Changes

Stderr policy propagation

Layer / File(s) Summary
Define and construct the stderr policy
src/runner/process/stderr_mode.rs, src/runner/process/request.rs, src/runner/mod.rs, tests/*
Define StderrMode, add it to Ninja request structures, re-export it, derive it from CLI state, and update request construction tests and fixtures.
Route subprocess output and logging
src/runner/process/mod.rs, src/runner/process/command_logging.rs, docs/developers-guide.md
Pass StderrMode through execution, route child streams using Forward or Suppress, and derive logging suppression fields from the policy.

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant Runner
  participant NinjaProcess
  participant CommandLogging
  CLI->>Runner: provide stderr configuration
  Runner->>Runner: derive StderrMode::from_cli
  Runner->>NinjaProcess: pass stderr_mode in request
  NinjaProcess->>NinjaProcess: route child stdout and stderr
  NinjaProcess->>CommandLogging: report execution or failure
  CommandLogging->>CommandLogging: derive suppress_stderr with is_suppress
Loading

Possibly related PRs

  • leynos/netsuke#323: It modifies the same command_logging APIs and stderr-control parameter.
  • leynos/netsuke#497: It uses the same Ninja request and process execution APIs extended by this change.

Suggested labels: Issue

Suggested reviewers: codescene-access, codescene-delta-analysis

Poem

A policy takes shape,
CLI paths guide the stream,
Ninja carries it,
Logs read the named mode,
JSON stderr stays clean.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (3 errors, 4 warnings)

Check name Status Explanation Resolution
Testing (Overall) ❌ Error The PR adds only unit tests for enum mapping. Existing tests do not exercise mismatched request policy or child-output suppression, so the process could ignore stderr_mode and still pass. Add subprocess integration tests with marker-emitting fake Ninja. Construct requests with cli.json and stderr_mode intentionally mismatched, then assert forwarding, suppression, and suppress_stderr logging.
Module-Level Documentation ❌ Error Flag src/runner/process/stderr_mode.rs: its module doc only names the policy and omits its utility, operation, and relationship to runner requests and process execution. Expand the module-level //! docs to explain Forward/Suppress routing, JSON diagnostics, CLI derivation, request propagation, and process-layer consumption.
Unit Architecture ❌ Error The process layer still derives policy from CLI JSON: stderr_mode.rs reads cli.json, and run_ninja/run_ninja_tool call from_cli before execution. Derive StderrMode in the runner boundary and pass it through every process request; keep process execution limited to consuming the explicit policy.
User-Facing Documentation ⚠️ Warning The PR adds public StderrMode and a required stderr_mode field, but docs/users-guide.md is unchanged; its Rust request example omits the field and policy guidance. Update the users' guide API example and prose with StderrMode::from_cli(&cli), Forward/Suppress routing, and the required request field; update the migration guide for callers.
Developer Documentation ⚠️ Warning Update the design record: docs/netsuke-design.md omits stderr_mode and still says Ninja stdout/stderr are always written back; no ADR records this boundary change. Document StderrMode, request propagation, and runner/process ownership in Section 6.1, or add an ADR for the decision.
Testing (Unit And Behavioural) ⚠️ Warning Unit tests cover only StderrMode mapping. Existing BDD tests cover forwarding, but JSON-mode fake Ninja emits no child output, so suppression is not tested at the CLI boundary. Add an end-to-end JSON-mode test with a fake Ninja that writes stdout and stderr markers; assert both are suppressed while the JSON diagnostic remains valid.
Domain Architecture ⚠️ Warning runner/process/stderr_mode.rs imports crate::cli::Cli and reads cli.json; this keeps CLI representation coupled to the process policy instead of the runner adapter. Move CLI-to-StderrMode mapping into runner; keep StderrMode and process execution dependent only on the explicit policy, not Cli or cli.json.
✅ Passed checks (13 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the explicit stderr policy change and links issue #340.
Description check ✅ Passed The description directly explains the stderr policy refactor, preserved behaviour, testing, and documentation changes.
Linked Issues check ✅ Passed The implementation satisfies issue #340 by adding StderrMode, removing direct CLI JSON reads, preserving JSON diagnostics, and updating tests.
Out of Scope Changes check ✅ Passed The code, documentation, and test changes directly support the stderr policy objectives in issue #340.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Testing (Property / Proof) ✅ Passed Do not require property or proof testing: StderrMode has two finite variants, rstest covers both boolean inputs and variants, and integration tests cover JSON routing.
Testing (Compile-Time / Ui) ✅ Passed Accept: the external UI harness compiles both request types with StderrMode, and focused JSON tests assert stable stdout/stderr and JSON semantics without brittle snapshots.
Observability ✅ Passed Initial evidence shows the change adds structured subprocess spans and failure logs with operation, bounded context, and suppress_stderr; no new metric or alert requirement is apparent.
Security And Privacy ✅ Passed The diff adds only explicit stream routing; JSON mode still drains child stdout/stderr, logs retain boolean suppression and redacted arguments, and no secrets or new sensitive sinks appear.
Performance And Resource Use ✅ Passed Approve: the feature commit adds a Copy enum and request field, while preserving the single stderr thread, streaming drains, waits, and forwarding calls; it adds no loops, buffers, clones, or I/O o...
Concurrency And State ✅ Passed Accept this check: StderrMode is immutable and Copy, the existing stderr thread owns its stream and is joined, and tests cover wait failure plus forward and suppress routing.
Architectural Complexity And Maintainability ✅ Passed Accept: StderrMode replaces one transport boolean across build/tool requests, streaming, and logging; the enum has immediate concrete consumers, tests, and no new dependencies or generic indirection.
Rust Compiler Lint Integrity ✅ Passed Keep the change: the full PR diff adds no broad lint suppression or clone, and StderrMode, its re-export, fields, imports, and helpers all have real consumers.
📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #340

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-340-make-subprocess-stderr-routing-an-explicit-policy

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Introduces an explicit StderrMode policy for subprocess standard-stream routing and threads it through runner requests and process handling, replacing direct use of cli.json while preserving existing behavior and diagnostics semantics.

Sequence diagram for deriving and applying StderrMode in subprocess execution

sequenceDiagram
    participant Cli
    participant StderrMode
    participant Runner as run_ninja
    participant Request as NinjaBuildRequest
    participant Process as run_command_and_stream_with_context
    participant Streaming as spawn_and_stream_output

    Cli->>StderrMode: from_cli(cli)
    StderrMode-->>Runner: StderrMode
    Runner->>Request: construct with stderr_mode
    Request->>Process: run_command_and_stream_with_context(cmd, status_observer, stderr_mode, operation)
    Process->>Streaming: spawn_and_stream_output(child, status_observer, stderr_mode)
    alt StderrMode::Suppress
        Streaming->>Streaming: forward_child_output(stderr, io::sink, "stderr")
        Streaming->>Streaming: forward_stdout(stdout, io::sink, status_observer)
    else StderrMode::Forward
        Streaming->>Streaming: forward_child_output(stderr, io::stderr, "stderr")
        Streaming->>Streaming: forward_stdout(stdout, io::stdout_lock, status_observer)
    end
Loading

File-Level Changes

Change Details Files
Introduce StderrMode policy type and derive it from CLI diagnostics settings.
  • Added src/runner/process/stderr_mode.rs defining the StderrMode enum, policy derivation helpers, and unit tests.
  • Implemented StderrMode::from_cli to map Cli.json to Forward/Suppress modes and is_suppress to expose the suppression state.
src/runner/process/stderr_mode.rs
Thread stderr_mode through runner requests and internal process execution APIs instead of passing suppress_stderr/cli.json.
  • Extended NinjaBuildRequest and NinjaToolRequest with a stderr_mode field and updated documentation comments.
  • Updated run_ninja, run_ninja_with, run_ninja_tool, run_ninja_tool_with, and handle_build/handle_ninja_tool to construct requests with StderrMode::from_cli.
  • Refactored NinjaInternalRequest to carry stderr_mode instead of Cli and updated run_ninja_internal, run_ninja_build_internal, and run_ninja_tool_internal accordingly.
src/runner/process/request.rs
src/runner/process/mod.rs
src/runner/mod.rs
tests/ui/command_env_embedder_pass.rs
tests/env_path_tests.rs
tests/bdd/steps/process.rs
Refactor process streaming and logging to consume StderrMode and keep structured suppress_stderr tracing field stable.
  • Changed run_command_and_stream_with_context, spawn_and_stream_output, forward paths, and exit-status handling to accept StderrMode instead of a bool suppress_stderr.
  • Adjusted stdout/stderr routing in spawn_and_stream_output to match StderrMode variants while preserving JSON stderr suppression behavior.
  • Updated command_logging helpers (log_command_execution, log_command_spawn_failure, log_command_exit_failure, command_span) to accept StderrMode and emit suppress_stderr = stderr_mode.is_suppress().
src/runner/process/mod.rs
src/runner/process/command_logging.rs
Update developer documentation to describe the new stderr_mode policy and its relationship to suppress_stderr tracing.
  • Revised developers-guide command logging section to explain suppress_stderr as derived from StderrMode via stderr_mode.is_suppress().
  • Documented that runner::process no longer reads cli.json directly and instead consumes a stderr_mode policy on requests alongside CommandEnv.
docs/developers-guide.md

Assessment against linked issues

Issue Objective Addressed Explanation
#340 Ensure process execution code no longer reads CLI diagnostic JSON state directly (e.g., Cli::resolved_diag_json() / cli.json) for stderr routing.
#340 Introduce a named policy type to represent stderr forwarding vs suppression (e.g., a StderrMode enum) and use it throughout subprocess execution.
#340 Preserve JSON diagnostics behaviour such that stderr (and stdout) remain machine-readable by suppressing child streams in JSON mode, with tests and formatting/linting passing.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as ready for review August 10, 2026 00:14

@sourcery-ai sourcery-ai Bot 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.

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai coderabbitai Bot added the Issue label Aug 10, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 949cc732b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/runner/process/stderr_mode.rs Outdated
Comment on lines +28 to +29
pub const fn from_cli(cli: &Cli) -> Self {
Self::from_json_enabled(cli.json)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Move CLI derivation out of the process policy

Because stderr_mode.rs is part of runner::process, this constructor leaves the process layer directly dependent on Cli::json, contrary to the documented boundary at docs/developers-guide.md:3089-3091 and the change's goal of separating reporting semantics from transport policy. Move this conversion to the runner call sites and keep StderrMode independent of Cli; otherwise future changes to JSON diagnostics still require changes inside the process-policy module.

AGENTS.md reference: AGENTS.md:L111-L119

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/developers-guide.md`:
- Around line 3195-3198: Wrap the prose in the documentation paragraph around
run_ninja_with and run_ninja_tool_with to stay within 80 columns, splitting the
long line as needed while keeping all code identifiers intact.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 10487064-6f73-4b50-a46a-3bde342713d3

📥 Commits

Reviewing files that changed from the base of the PR and between 487f77e and 949cc73.

📒 Files selected for processing (9)
  • docs/developers-guide.md
  • src/runner/mod.rs
  • src/runner/process/command_logging.rs
  • src/runner/process/mod.rs
  • src/runner/process/request.rs
  • src/runner/process/stderr_mode.rs
  • tests/bdd/steps/process.rs
  • tests/env_path_tests.rs
  • tests/ui/command_env_embedder_pass.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/rstest-bdd (auto-detected)
  • leynos/ortho-config (auto-detected)
  • leynos/whitaker (auto-detected)
  • leynos/shared-actions (auto-detected)

Comment thread docs/developers-guide.md Outdated
Remove the `StderrMode::from_cli` constructor so the process-policy type
no longer depends on `Cli::json`. The runner call sites now derive the
policy with `StderrMode::from_json_enabled(cli.json)` when building a
request, keeping reporting semantics out of the process layer and
honouring the documented boundary that the process layer never reads
`cli.json` itself.

Co-Authored-By: Claude <noreply@anthropic.com>
codescene-access[bot]

This comment was marked as outdated.

@leynos
leynos marked this pull request as draft August 14, 2026 00:50
codescene-access[bot]

This comment was marked as outdated.

leynos and others added 4 commits August 14, 2026 03:06
Move the `run_ninja`/`run_ninja_tool` convenience wrappers into the runner
boundary so `runner::process` contains no code that reads `cli.json` to
choose the stderr policy: the wrappers build requests with
`StderrMode::from_json_enabled(cli.json)` and the process layer consumes
only the explicit `stderr_mode` field.

Expand the `StderrMode` module documentation and add the missing coverage
requested in review: a unit test that spawn-failure logging follows the
explicit policy even when the request's `cli.json` is mismatched, and a
CLI-level test proving `--json build` with a marker-emitting fake Ninja
suppresses both child stdout and stderr.

Co-Authored-By: Claude <noreply@anthropic.com>
The `run_ninja_with` rustdoc referenced `[run_ninja]` as an in-scope item,
but the convenience wrapper now lives at the runner boundary. Qualify the
link to `crate::runner::run_ninja` so the rustdoc gate passes.

Co-Authored-By: Claude <noreply@anthropic.com>
Bind the spawn result and assert it errors instead of discarding it with
`let _`, which trips clippy::let-underscore-must-use under the workspace's
`-D warnings` lint policy. The assertion also pins the premise the test
rests on: running a missing Ninja must fail before any forwarding.

Co-Authored-By: Claude <noreply@anthropic.com>
Moving the ninja convenience wrappers into the runner boundary pushed
src/runner/mod.rs to 436 lines, over the Whitaker module_max_lines limit
of 400. Extract reporter construction (ReporterOptions, make_reporter,
should_force_text_task_updates) into a dedicated reporter.rs submodule and
move its unit test alongside, returning the module to 394 lines without
behaviour changes.

Co-Authored-By: Claude <noreply@anthropic.com>

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Failed
Enforce advisory code health rules (1 file with Code Duplication)

Our agent can fix these. Install it.

Gates Passed
5 Quality Gates Passed

Reason for failure
Enforce advisory code health rules Violations Code Health Impact
mod.rs 1 advisory rule 10.00 → 9.39 Suppress

See analysis details in CodeScene

Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

Comment thread src/runner/mod.rs
Comment on lines +167 to +181
pub fn run_ninja(
program: &Path,
cli: &Cli,
build_file: &Path,
targets: &BuildTargets<'_>,
) -> io::Result<()> {
run_ninja_with(&NinjaBuildRequest {
program,
cli,
build_file,
targets,
env: &CommandEnv::inherit(),
stderr_mode: StderrMode::from_json_enabled(cli.json),
})
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

❌ New issue: Code Duplication
The module contains 2 functions with similar structure: run_ninja,run_ninja_tool

Suppress

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No quality gates enabled for this code.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make subprocess stderr routing an explicit policy

1 participant