You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Name a Newer dotnet SDK From Outside the Managed Package in the Windows Report - #2578
The Windows dotnet report row read only the managed winget package, Microsoft.DotNet.SDK.10. Visual Studio installs its own SDKs, previews included, into the same dotnet root, and so does any other winget SDK package. A host could therefore show outdated while the shell already ran a newer SDK, and nothing in the report said so.
The row now reads dotnet --list-sdks and names the newest SDK above the managed package's installed version in a note. When no global.json pins another SDK, that newer one is what dotnet runs. The status still compares the managed package alone, since that is the copy -Upgrade acts on. This is the "at minimum add a note" direction #694 suggests.
Read-DotnetSdkList reduces the listing to its versions, and Get-DotnetSdk runs it. That returns nothing where dotnet is absent or exits non-zero.
Get-UntrackedDotnetSdk picks the newest SDK above the installed version. A prerelease and its release share one version key, so on a tie the release wins. Between two prereleases the later-listed one wins, since dotnet lists in ascending order.
host-setup/windows/README.md documents the note beside the other provenance rules.
Verification
Tests:TestWindowsUntrackedDotnetSdk drives the installer's own functions through 9 cases: a preview ahead of the managed package, the newest of several, a release beside its own preview in both orders, two prereleases of one band, the managed package holding the newest SDK, a preview of the managed package's own release, an unread installed version, and a listing with no SDK. tests.test_install_tools passes natively on Windows (15 tests, 9 Linux-only skips).
Mutation: with the tie rule reverted to strict-greater, or loosened to later-listed-wins, a case fails each time.
Native:install-tools.ps1 -Report dotnet on this Windows host, where the newest SDK is the managed one, adds no note. With a stub dotnet listing a newer release and its preview ahead on PATH, the table and -Json both carry the note, which names the release.
Checks: ruff, mypy, PSScriptAnalyzer, markdownlint, cspell, editorconfig-checker and the prose gate are clean, sentence length included. The changed comment lines need the comments label.
Local strict review: three rounds ran. Round 1 found the preview winning a tie with its own release, a test gap, and two long sentences. Round 2 found the note blaming an untracked installer for an SDK another winget package may have installed, plus a test-order gap. Both rounds' findings were fixed. Round 2 also raised a case that was declined: if the managed package's own installed version were a prerelease, a same-key release elsewhere would be skipped. That can't happen while the pin is SDK.10, which ships no previews. Round 3 raised none.
Visual Studio lands its own dotnet SDKs, previews included, in the same
directory the winget SDK packages use, and winget's inventory never
holds them. The report compared winget's copy alone and said nothing
when dotnet actually runs a newer one.
The dotnet row now reads `dotnet --list-sdks` and names the newest SDK
above winget's installed version in a note. The status still compares
winget's copy, since that is the copy an upgrade acts on.
Refs #694
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A prerelease and its release share one version key, so the first one
listed won, and dotnet lists the preview first, while it runs the
release. On an equal key the release now wins, and between two
prereleases the later entry does.
Refs #694
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The note said an installer winget does not track put a newer SDK
there, which is false where winget installed it under another id, such
as the preview SDK package. The note and README now name the one
package the row reads instead. A test lists a release ahead of its own
preview, so the release-wins rule is checked in both orders.
Refs #694
Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.85%. Comparing base (3013808) to head (3ba4b0f). ⚠️ Report is 2 commits behind head on develop.
The helper tests left Get-DotnetSdk and the note's wiring unexercised,
since the report harness stubs Add-ToolNote. A new test runs the real
Add-ToolNote with a stub dotnet alone on PATH, covering a newer SDK,
a non-zero exit, no dotnet at all, and an unread installed version.
Refs #694
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A stub printing its listing for any argument let a call asking for the wrong listing pass. Each stub now exits 9 for anything but --list-sdks.
Refs #694
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Suppress dotnet listing stderr when treating failures as empty
host-setup/windows/install-tools.ps1:616
[P2] Suppress native stderr when treating a failed SDK listing as empty. dotnet --list-sdks writes failures to the native error stream, and this call leaves that stream connected even though the next line deliberately treats a non-zero exit as no data. A broken dotnet can therefore leak diagnostics into a report (and into callers of -Json) instead of the promised quiet no-note result; redirect stderr while reading the listing.
[P2] Suppress native stderr when treating a failed SDK listing as empty. dotnet --list-sdks writes failures to the native error stream, and this call leaves that stream connected even though the next line deliberately treats a non-zero exit as no data. A broken dotnet can therefore leak diagnostics into a report (and into callers of -Json) instead of the promised quiet no-note result; redirect stderr while reading the listing.
Declined, with evidence. The -Json half does not hold. Get-DotnetSdk captures the listing's stdout into a variable, and the native stderr stays on the process's stderr, so the JSON document on stdout is untouched. Probed natively on Windows with a stub dotnet.cmd on PATH that writes broken host diagnostic to stderr and exits 1, then install-tools.ps1 -Json dotnet with stdout and stderr redirected to separate files:
The code promises no note on a failed listing, not silence. A broken dotnet printing its own error on stderr is the one signal telling the operator that the absent note means "could not read" rather than "nothing newer". Redirecting it away would turn a broken install into a silently reassuring report.
…Line (#2580)
## Summary
Promotes two changes from `develop`.
- [#2579](#2579):
`EFFORT_LINE` in `scripts/pr_review.py` accepts a run of non-ASCII
characters before `**Review effort`, so Copilot's revised overview body,
which opens that line on an emoji, reports its effort level instead of
`effort=unknown`. The run excludes whitespace so the pattern stays
linear. `overview_v2_revised` takes an optional effort line, and a new
test builds the emoji line from an escape and asserts the explicit and
inherited levels, the digest field, and that an ASCII word before the
label still reads as prose.
- [#2578](#2578), merged
to `develop` by another lane, rides along. The Windows `dotnet` report
row now reads `dotnet --list-sdks` and names, in a note, the newest SDK
above the managed `Microsoft.DotNet.SDK.10` package's installed version,
since Visual Studio and other winget packages install into the same
`dotnet` root. The status still compares the managed package alone, as
that is the copy `-Upgrade` acts on. `host-setup/windows/README.md`
documents the note, and `tests/test_install_tools.py` covers it.
Fixes#2487Fixes#694
## Verification
- #2579 took two recorded local strict-review passes. The first found
that the fixture used the earlier v2 shape, which the second commit
fixed, and the second raised nothing.
- #2578's own verification, local strict-review rounds, and native
Windows run are in its pull request body.
- Copilot's round on #2579 recommended approval with no open finding,
and the digest read `effort=lite effort_source=explicit` from that
round's own emoji-prefixed line. CodeRabbit, prompted once, generated no
actionable comment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
commentsPermits the comment lines the pull request adds or edits, which the prose gate otherwise refuses
2 participants
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.
Summary
The Windows
dotnetreport row read only the managed winget package,Microsoft.DotNet.SDK.10. Visual Studio installs its own SDKs, previews included, into the samedotnetroot, and so does any other winget SDK package. A host could therefore showoutdatedwhile the shell already ran a newer SDK, and nothing in the report said so.The row now reads
dotnet --list-sdksand names the newest SDK above the managed package's installed version in a note. When noglobal.jsonpins another SDK, that newer one is whatdotnetruns. The status still compares the managed package alone, since that is the copy-Upgradeacts on. This is the "at minimum add a note" direction #694 suggests.Read-DotnetSdkListreduces the listing to its versions, andGet-DotnetSdkruns it. That returns nothing wheredotnetis absent or exits non-zero.Get-UntrackedDotnetSdkpicks the newest SDK above the installed version. A prerelease and its release share one version key, so on a tie the release wins. Between two prereleases the later-listed one wins, sincedotnetlists in ascending order.host-setup/windows/README.mddocuments the note beside the other provenance rules.Verification
TestWindowsUntrackedDotnetSdkdrives the installer's own functions through 9 cases: a preview ahead of the managed package, the newest of several, a release beside its own preview in both orders, two prereleases of one band, the managed package holding the newest SDK, a preview of the managed package's own release, an unread installed version, and a listing with no SDK.tests.test_install_toolspasses natively on Windows (15 tests, 9 Linux-only skips).install-tools.ps1 -Report dotneton this Windows host, where the newest SDK is the managed one, adds no note. With a stubdotnetlisting a newer release and its preview ahead onPATH, the table and-Jsonboth carry the note, which names the release.commentslabel.SDK.10, which ships no previews. Round 3 raised none.Closes on promotion: #694
🤖 Generated with Claude Code