[Macros] Set binary I/O mode in MockPlugin in Windows#88409
Open
rintaro wants to merge 1 commit intoswiftlang:mainfrom
Open
[Macros] Set binary I/O mode in MockPlugin in Windows#88409rintaro wants to merge 1 commit intoswiftlang:mainfrom
rintaro wants to merge 1 commit intoswiftlang:mainfrom
Conversation
Member
Author
|
@swift-ci Please smoke test |
b36992c to
4d3dd41
Compare
Member
Author
|
@swift-ci Please test |
In Windows, stdin/stdout is "text" mode by default, but macro plugin message is binary data. rdar://174235365
4d3dd41 to
90866ee
Compare
Member
Author
|
@swift-ci Please smoke test |
Contributor
|
@swift-ci please smoke test macOS |
compnerd
approved these changes
Apr 10, 2026
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.
Explanation: In Windows, stdin/stdout is "text" mode by default, where
0x1Ais considered EOF.libMockPlugindidn't set them to "binary" mode, so when a binary macro plugin message happens to contains it, the plugin exits silently and and the test fails. Set stdin/stdout "binary" mode instead.Scope: Macro plugin testing
Risk: Low.
libMockPluginis a macro plugin testing tool and it only affects test cases.Issue: rdar://174235365
Testing: Passes current test cases, and a known issue-reproducing case.
Reviewer: @hamishknight @compnerd