Skip to content

Chore: Refresh .bsl baselines#19603

Open
T-Gro wants to merge 5 commits intomainfrom
fix/adjust-baselines
Open

Chore: Refresh .bsl baselines#19603
T-Gro wants to merge 5 commits intomainfrom
fix/adjust-baselines

Conversation

@T-Gro
Copy link
Copy Markdown
Member

@T-Gro T-Gro commented Apr 16, 2026

Summary

Mass refresh of all test baseline (.bsl) files to ensure they exactly match current compiler output. Addresses #18289 (comment).

Approach

Temporarily modified test framework files to force-write baselines unconditionally (even on pass) when TEST_UPDATE_BSL=1, ran every test suite in both Release and Debug modes across net10.0 and net48, then reverted all framework modifications — only .bsl file changes remain.

Changes by category

Release baselines (381 files)

Category Files Description
EmittedIL — IL (shared) 225 Desktop+netcore shared IL baselines
EmittedIL — IL (netcore) 70 Netcore-specific IL baselines
EmittedIL — IL (desktop release) 31 Desktop Release-specific IL baselines
EmittedIL — error 31 New empty error baselines (no errors expected)
Shadowing — error 12 New empty error baselines
Shadowing — IL (shared) 10 Shadowing IL baselines
Shadowing — IL (netcore) 2 Shadowing netcore IL baselines

Debug baselines (69 files)

Category Files
EmittedIL — IL (debug) 69

Validation

All tests verified passing in Release mode on both TFMs:

Suite net10.0 net48
ComponentTests 6,896 ✅ 6,530 ✅
Service.Tests 2,120 ✅ 2,120 ✅
FSharpSuite.Tests 543 ✅ 666 ✅
Core.UnitTests all ✅ all ✅
ILVerify all match ✅

Zero baseline-related failures.

Mass refresh of all baseline files across the test suite to ensure
they reflect current compiler output. Addresses #18289.

Categories refreshed:
- EmittedIL baselines (756+ tests, both net10.0 and net48)
- SyntaxTree baselines (1042 tests)
- Conformance/TypeChecks/Shadowing/Nullness baselines
- CompilerOptions/ConstraintSolver/Signatures baselines
- Surface Area baselines (FCS + FSharp.Core)
- Legacy FSharpSuite baselines (543 tests)
- ILVerify baselines (8 files, verified matching)

All tests verified passing after refresh:
- EmittedIL: 2187 passed, 0 failed
- SyntaxTree: 2084 passed, 0 failed
- Conformance: 2852 passed, 0 failed
- Legacy: 543 passed, 0 failed

381 .bsl files updated (338 modified, 43 new empty .err.bsl files).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ No release notes required

@T-Gro T-Gro enabled auto-merge (squash) April 16, 2026 16:00
@T-Gro T-Gro requested a review from abonie April 16, 2026 16:01
@auduchinok
Copy link
Copy Markdown
Member

@T-Gro Thanks a lot for this!

ran every test suite in Release mode across both net10.0 and net48, then reverted all framework modifications — only .bsl file changes remain.

There're also Debug-specific baselines, could you update them too, please?

@T-Gro
Copy link
Copy Markdown
Member Author

T-Gro commented Apr 16, 2026

There're also Debug-specific baselines, could you update them too, please?

I can do it now, it fits into this PR.

Longterm I don't like having them as they are not CI exercised.
I wouldn't mind getting rid of them - I guess your WIP PR would change all of them anyway, right? (or most of them)

@auduchinok
Copy link
Copy Markdown
Member

Longterm I don't like having them as they are not CI exercised.

Or maybe we should check some of them on CI, since debug/optimize switches may affect code generation drastically and we probably want to verify that too.

Update 69 debug-specific IL baseline files to match current compiler output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@T-Gro
Copy link
Copy Markdown
Member Author

T-Gro commented Apr 17, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@T-Gro
Copy link
Copy Markdown
Member Author

T-Gro commented Apr 17, 2026

Or maybe we should check some of them on CI, since debug/optimize switches may affect code generation drastically and we probably want to verify that too.

Locally, you typically run a debug-mode-created compiler to run tests in debug.
(or release-built compiler to run tests in release).

  • a few tests can control their debug,optimize etc switches. But those are a clear minority.

But we never ship the debug-mode-created compiler.
So I guess it might be better to add another dimensions to the test suite and run release-built-compiler, compiling test code in debug.

This will create the additional overhead of having to maintain two sets of baselines any time release and debug will differ. Until now, it was optional.

(the initial introduction will have to deal with that for all existing tests, + also new combinations (e.g. debug mode, but having a selected optimization flag on )

@auduchinok
Copy link
Copy Markdown
Member

a few tests can control their debug,optimize etc switches. But those are a clear minority.

Yes, these are what I meant. Not the compiler but the emitted IL ones.

@T-Gro
Copy link
Copy Markdown
Member Author

T-Gro commented Apr 17, 2026

Doing it right now, I am more inclined to dropping the .il.debug.bsl files.
Reason is, they are not derived from switches applied to test code, those have to be supplied explicitely (like passing explicit optimize+,optimize- flags).

It only runs the same tests with the compiler built in debug, which is not a product concern.

So for intentionally different codegen scenarios, having two tests over same source code, but with different compiler flags, is what we should want instead.

=> I will check if I can normalize that and reduce the .debug and .release duplicates

@github-project-automation github-project-automation bot moved this from New to In Progress in F# Compiler and Tooling Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants