-
Notifications
You must be signed in to change notification settings - Fork 832
Normalize ILVerify output to remove auto-generated numeric suffixes #18912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…umeric suffixes Co-authored-by: T-Gro <[email protected]>
|
I'm wondering what are we trying to achieve with these baselines? Do we need them for FCS, especially for all the compiler-generated implementation details, as opposed to FSharp.Core? Does anyone analyze them in some PRs? I tend to think these baselines add more friction than actual help, at least for FCS. |
|
Absolute majority of PRs do not affect codegen, so I agree with you. |
✅ No release notes required |
|
/run ilverify |
🔧 CLI Command Report
✅ Patch applied: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds normalization to ILVerify output comparison to eliminate spurious test failures caused by auto-generated numeric suffixes in F# method names. The normalization removes closure suffixes, pipe patterns, function suffixes, and line references that change between builds but don't affect actual verification results.
Key changes:
- Added
Normalize-IlverifyOutputLinefunction to remove auto-generated F# compiler numbering patterns - Applied normalization to ILVerify output during comparison processing
- Updated baseline files to reflect normalized method names without numeric suffixes
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/ILVerify/ilverify.ps1 | Added normalization function and applied it to ILVerify output processing |
| tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.1.bsl | Updated baseline with normalized method names |
| tests/ILVerify/ilverify_FSharp.Core_Release_netstandard2.0.bsl | Updated baseline with normalized method names |
| tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.1.bsl | Updated baseline with normalized method names |
| tests/ILVerify/ilverify_FSharp.Core_Debug_netstandard2.0.bsl | Updated baseline with normalized method names |
| tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl | Updated baseline with normalized method names |
| tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net10.0.bsl | Updated baseline with normalized method names |
| tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl | Updated baseline with normalized method names |
| tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net10.0.bsl | Updated baseline with normalized method names |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@T-Gro Thanks a lot!
Problem
The ILVerify baseline comparison was generating spurious diffs due to auto-generated numeric suffixes in F# method names that change between builds. These patterns include:
+clo@924-516Pipe #1 stage #1 at line 1782@1782parseOption@269at line 1234When the F# compiler generates different numbers for these constructs, the ILVerify output differs even though the actual verification results are semantically identical, causing CI failures.
Solution
Added a
Normalize-IlverifyOutputLinefunction totests/ILVerify/ilverify.ps1that removes these auto-generated numeric suffixes before baseline comparison. The function:+clo@924-516→+cloPipe #1 stage #1 at line 1782@1782→ (removed)parseOption@269→parseOptionat line 1234→ (removed)The normalization is applied to both the ILVerify output and baseline content during comparison, ensuring that functionally equivalent outputs match regardless of auto-generated numbering.
Example
Before normalization:
After normalization:
Now different builds with different auto-generated numbers will normalize to identical baseline comparisons, eliminating false positive CI failures while maintaining full verification integrity.
Impact
This pull request was created as a result of the following prompt from Copilot chat.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.