Skip to content

Fix #18086: suppress NuGet restore stdout under FSI --quiet#19808

Open
T-Gro wants to merge 4 commits into
mainfrom
fix/issue-18086
Open

Fix #18086: suppress NuGet restore stdout under FSI --quiet#19808
T-Gro wants to merge 4 commits into
mainfrom
fix/issue-18086

Conversation

@T-Gro
Copy link
Copy Markdown
Member

@T-Gro T-Gro commented May 26, 2026

Summary

When --quiet ( cConfigB.noFeedback) is active, route the captured stdout of the NuGet restore subprocess to stderr instead of stdout so that warnings like NU1608 and MSBuild Determining projects to restore... chatter no longer pollute FSI stdout.

Default (non-quiet) behavior is unchanged.
esult.StdError continues to go to stderr unconditionally.

Changes

  • src/Compiler/Interactive/fsi.fs – When
    oFeedback is set, redirect restore stdout to stderr instead of stdout.
  • ** ests/.../FsiCliTests.fs** – Add a test verifying that --quiet suppresses NuGet restore stdout.
  • Release notes – Added entry under Fixed for 11.0.100.

Fixes #18086

T-Gro and others added 3 commits May 26, 2026 08:46
When --quiet (tcConfigB.noFeedback) is active, route the captured stdout of the NuGet restore subprocess to stderr instead of stdout so that warnings like NU1608 and MSBuild `Determining projects to restore...` chatter no longer pollute FSI stdout. Default (non-quiet) behavior is unchanged. result.StdError continues to go to stderr unconditionally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

❗ Release notes required


✅ Found changes and release notes in following paths:

Warning

No PR link found in some release notes, please consider adding it.

Change path Release notes path Description
src/Compiler docs/release-notes/.FSharp.Compiler.Service/11.0.100.md No current pull request URL (#19808) found, please consider adding it

@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label May 26, 2026
Copy link
Copy Markdown
Member Author

@T-Gro T-Gro left a comment

Choose a reason for hiding this comment

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

Review: LGTM - Clean, well-targeted fix.

The change correctly routes NuGet restore stdout to Console.Error under --quiet mode while preserving it for users who redirect stderr. This is a reasonable design choice — slightly different from other noFeedback paths that use nullOut (full discard), but defensible since this is external process output that users may still want access to.

Tests are well-structured and cover the key scenarios (quiet suppresses NuGet chatter, default mode still works, user output still reaches stdout).

Minor suggestion: Consider adding Assert.Equal(0, result.ExitCode) in the FSI quiet mode suppresses NuGet restore output from stdout test for extra robustness — if NuGet resolution fails due to network issues, the test would fail with a clearer signal than the marker assertion.

@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-reviewed PR reviewed by AI review council AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Nuget warnings in fsi are emitted to stdout and cannot be suppressed with --quiet

1 participant