Skip to content

Remove always-on PrintfBinaryFormat language feature flag - #20202

Merged
abonie merged 7 commits into
mainfrom
fix/issue-20138
Aug 5, 2026
Merged

Remove always-on PrintfBinaryFormat language feature flag#20202
abonie merged 7 commits into
mainfrom
fix/issue-20138

Conversation

@T-Gro

@T-Gro T-Gro commented Aug 4, 2026

Copy link
Copy Markdown
Member

Fixes #20138

PrintfBinaryFormat has 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 %B format specifier are removed; --disableLanguageFeature:PrintfBinaryFormat is no longer a recognized feature name and is now rejected with FS3881.

Copilot and others added 4 commits August 4, 2026 12:24
…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>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label Aug 4, 2026
@T-Gro T-Gro added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Aug 5, 2026
@T-Gro
T-Gro requested a review from abonie August 5, 2026 08:05
@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Aug 5, 2026
@abonie
abonie merged commit 5fa2950 into main Aug 5, 2026
48 of 49 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in F# Compiler and Tooling 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Remove always-on language feature flag: PrintfBinaryFormat

3 participants