Uh oh!
There was an error while loading. Please reload this page.
Scoped nowarn - #18049
Conversation
❗ Release notes required
|
psfinaki
commented
Nov 29, 2024
Hi @Martin521 - thanks for the contribution. It's a substantial effort and we appreciate it. The PR is on our radar - just keep in mind that it's big and specific, and it will take time to find capacity for it. If anyone from the community gets to thoroughly review it, that would be valuable as well. Thanks for your diligence and patience :) |
Martin521
commented
May 12, 2025
@T-Gro |
T-Gro
commented
May 14, 2025
It can be merged, now just waiting for a second tick from other maintainers. I asked offline to give it, expect it to be merged soon. |
Thorium
commented
May 14, 2025
987 files changed, a huge thing! :-D |
psfinaki
commented
May 14, 2025
Well done @Martin521! Your persistence here was exemplary - great job :) |
Description
Implements Scoped Nowarn according to draft RFC FS-1146.
This PR has taken a while. I had to deal with much more complexity than I imagined when I naively volunteered to tackle the feature request. Anyway, here we are.
I have split the PR into 7 commits that can be reviewed in sequence.
All of them compile, 1 and 4 - 7 also pass all tests locally.
Add the feature flag, baseline tests, and the core
WarnScopesmodule. Seesrc/Compiler/SyntaxTree/WarnScopes.fsiand the RFC for the functionality of the module.Add the necessary changes to lexing and parsing. Note that the warn directives can no longer be collected during parsing (since they can now appear not only in top-level modules, but anywhere). So we collect them during lexing, similar to the processing of #if/#else/#endif directives.
Remove legacy #nowarn processing (but hold off AST changes)
Integrate the WarnScopes functionality and test it
Add warn directive trivia (but hold off AST changes)
Enable warn directive trivia (which means AST changes)
Remove defunct types and parameters related to former #nowarn processing (more AST changes)
There is also a separate commit for the IlVerify baseline updates (change in line numbers only)
Checklist