Bump Linux SDK to 1.23.0 and guard char->wide formatters to Windows#41071
Merged
benhillis merged 1 commit intoJul 22, 2026
Merged
Conversation
… to Windows The new Linux SDK ships libc++ 21, which provides deleted std::formatter specializations for char->wchar_t cross-encoding formatting per C++23 [format.formatter.spec]. Our own specializations collide with those on the Linux components. Restrict them to WIN32, where MSVC needs them and does not define the deleted specializations.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repo’s Linux SDK dependency to Microsoft.WSL.LinuxSdk 1.23.0 (bringing in libc++ 21) and resolves a Linux build break by limiting WSL’s char→wchar_t std::formatter specializations to Windows-only builds, avoiding collisions with libc++’s C++23 deleted cross-encoding specializations.
Changes:
- Bump
Microsoft.WSL.LinuxSdkfrom1.20.0to1.23.0inpackages.config. - Wrap
std::formatter<..., wchar_t>specializations forchar*/const char*/char[N]/std::basic_string<char,...>in#ifdef WIN32to prevent libc++ redefinition conflicts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/shared/inc/stringshared.h |
Restricts char→wchar_t formatter specializations to Windows to avoid libc++ collision when building Linux components. |
packages.config |
Updates Microsoft.WSL.LinuxSdk package version to 1.23.0. |
This was referenced Jul 13, 2026
OneBlue
approved these changes
Jul 22, 2026
| } | ||
| }; | ||
|
|
||
| // char -> wchar_t formatting is only used by the Windows components. libc++ (used to |
Collaborator
There was a problem hiding this comment.
I'm sad to learn about this, but I guess this will be a problem for later
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.
Summary
The new Linux SDK (1.23.0) ships libc++ 21, which now provides deleted
std::formatterspecializations forchar->wchar_tcross-encoding formatting per C++23 [format.formatter.spec]. Our own char->wide specializations instringshared.hcollide with those when building the Linux components, causing redefinition errors.These specializations are only used by the Windows components (MSVC leaves the primary formatter template deleted-but-undefined, so our specializations are legal there and are relied upon). This change restricts them to
#ifdef WIN32, which resolves the collision on Linux while leaving Windows behavior unchanged.Changes
Microsoft.WSL.LinuxSdk1.20.0 -> 1.23.0std::formatterspecializations behindWIN32