Repository navigation
[native_toolchain_c] Decode vswhere UTF-8 output correctly on Windows - #3773
Merged
dcharkes merged 3 commits intoNov 5, 2026
Merged
Conversation
6 tasks done
dcharkes
approved these changes
Nov 3, 2026
dcharkes
left a comment
Collaborator
There was a problem hiding this comment.
LGTM!
Thanks @dzylikecode !
(Great to see that the fake process manager helps us test this! We had untestable fixes for other languages earlier before we had a process manager.)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
copybara-service Bot
pushed a commit
to dart-lang/sdk
that referenced
this pull request
Nov 12, 2026
Revisions updated by `dart tools/rev_sdk_deps.dart`. dartdoc (https://github.com/dart-lang/dartdoc/compare/2f6847b..03ec6df): 03ec6df6 Thu Nov 5 11:12:45 2026 +0200 Sergey G. Grekhov Add tests for type parameters (dart-lang/dartdoc#4308) 14a91302 Tue Nov 3 04:24:32 2026 +0100 Moritz Migrate to ecosystem health publish check and setup-dart publish workflow (dart-lang/dartdoc#4310) cd8bf52c Mon Nov 2 14:19:25 2026 +0100 Sigurd Meldgaard Support standalone AOT compilation and embed resources in html_resources.g.dart (dart-lang/dartdoc#4298) cb1b1b2f Mon Nov 2 14:39:28 2026 +0200 Sergey G. Grekhov Add tests for parameters (dart-lang/dartdoc#4304) 07506415 Mon Nov 2 12:14:22 2026 +0100 dependabot[bot] Bump the github-actions group across 1 directory with 3 updates (dart-lang/dartdoc#4311) 494aec7f Mon Nov 2 12:14:05 2026 +0100 Sarah Zakarias Add a "Documentation inherited from" note to inherited doc comments (dart-lang/dartdoc#4309) 527502a9 Mon Nov 2 11:21:46 2026 +0100 Sarah Zakarias Give the mock SDK the version of the SDK running the tests (dart-lang/dartdoc#4312) http (https://github.com/dart-lang/http/compare/1f869d0..4646fe6): 4646fe6 Thu Nov 5 02:41:04 2026 +0530 Chandra ObulaReddy [http] Don't throw in RetryClient when `when` has read the response stream (dart-lang/http#2040) native (https://github.com/dart-lang/native/compare/1838637..6287745): 6287745ca Thu Nov 5 20:37:11 2026 +0800 Dz [hooks_runner] Fix UTF-8 decoding of hook output on Windows (dart-lang/native#3772) 0eada93f9 Thu Nov 5 19:18:09 2026 +0800 Dz [native_toolchain_c] Decode vswhere UTF-8 output correctly on Windows (dart-lang/native#3773) Change-Id: If15b14dac054320ded19f0633a71b77463b9b718 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/574640 Auto-Submit: Nate Bosch <[email protected]> Commit-Queue: Nicholas Shahan <[email protected]> Reviewed-by: Nicholas Shahan <[email protected]>
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.
Description
Related to #3593.
VisualStudioResolverrequestsvswhere.exe -format json -utf8, butrunProcessdecoded its output using the Windows system encoding. On a ChineseWindows host, this corrupts localized JSON text and can cause a
FormatExceptioninparseVswhereor break non-ASCII installation paths.Add optional stdout/stderr encoding parameters to the internal process helper,
keeping
systemEncodingas the default for existing native tool invocations.The
vswhere -utf8invocation explicitly selects UTF-8. Decode streams ratherthan individual pipe chunks so multibyte characters split across events survive.
Add a resolver regression using localized JSON and a Chinese installation path,
with every byte emitted in a separate event. It fails against the original
implementation. Process tests cover independently selected stdout/stderr
encodings, captured output, streaming logs, nonzero exit codes, and preservation
of the default system encoding.
Validation on Windows x64 (Chinese system encoding), Dart 3.13.7:
ARM64 Visual Studio components are not installed. The localized JSON
regression and real Visual Studio x64 discovery pass.
hooks_runnernative_add buildintegration test passes, includingMSVC discovery and native compilation.
CBuilder flagstest passes, compiling and executing a C program.PR Checklist
dart tool/ci.dart --alllocally and resolved all issues identified. This ensures the PR is formatted, has no lint errors, and ran all code generators. This applies to the packages part of the toplevelpubspec.yamlworkspace.CHANGELOG.mdfor the relevant packages. (Not needed for small changes such as doc typos).