Remove always-on PrintfBinaryFormat language feature flag - #20202
Merged
Conversation
…ure:PrintfBinaryFormat Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes an inaccurate comment (claimed minimum accepted --langversion is 8.0) flagged during expert review. %B is now unconditional across all langversions after removing the PrintfBinaryFormat feature flag. Comment-only change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The expert-review finding noted the %B guard test compiled under the default (latest) langversion where %B was already accepted, giving no regression value for the removed 6.0 gate. A sub-6.0 test is infeasible: the minimum supported langversion is 8.0 (lower versions error with FS3880), already above the old 6.0 gate, so removing the PrintfBinaryFormat flag is a pure no-op for every supported langversion. The guard test now clearly asserts the %B code path is intact (compiles and runs, producing 10011), with the 3881 rejection test covering removal of the feature name. Comment documents why no sub-6.0 test exists. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
abonie
approved these changes
Aug 5, 2026
bartelink
pushed a commit
to bartelink/fsharp
that referenced
this pull request
Aug 6, 2026
* Add RED tests for unconditional %B and rejected --disableLanguageFeature:PrintfBinaryFormat Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Remove always-on PrintfBinaryFormat language feature flag Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Correct langversion comment in disableLanguageFeature %B guard test Fixes an inaccurate comment (claimed minimum accepted --langversion is 8.0) flagged during expert review. %B is now unconditional across all langversions after removing the PrintfBinaryFormat feature flag. Comment-only change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Make %B guard test accurate: assert compile+run at supported langversion The expert-review finding noted the %B guard test compiled under the default (latest) langversion where %B was already accepted, giving no regression value for the removed 6.0 gate. A sub-6.0 test is infeasible: the minimum supported langversion is 8.0 (lower versions error with FS3880), already above the old 6.0 gate, so removing the PrintfBinaryFormat flag is a pure no-op for every supported langversion. The guard test now clearly asserts the %B code path is intact (compiles and runs, producing 10011), with the 3881 rejection test covering removal of the feature name. Comment documents why no sub-6.0 test exists. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add release notes for PrintfBinaryFormat flag removal Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Drop release notes and added guard tests: this is cleanup-only Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 7, 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.
Fixes #20138
PrintfBinaryFormathas shipped since F# 6.0 and is enabled for every selectable--langversion(the minimum accepted is 8.0), so its flag could never be turned off. The flag and its guard on the%Bformat specifier are removed;--disableLanguageFeature:PrintfBinaryFormatis no longer a recognized feature name and is now rejected with FS3881.