-
Notifications
You must be signed in to change notification settings - Fork 796
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
Scoped nowarn #18049
base: main
Are you sure you want to change the base?
Scoped nowarn #18049
Conversation
❗ Release notes required
|
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 :) |
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.
Hi @Martin521 and sorry this has been taking forever! I know you're patient but we shouldn't exercise your patience too much :)
We've discussed this PR within the team. In generally, we're in favor of having this in - it's a valuable improvement. That said, since the PR touches a few important places, we should be very sure that we don't compromise the compiler design and VS functionality. It's not that both are perfect but you know - the boy scout rule.
I added a few notes in accord with this - let's iterate here a bit and refine the changes.
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs
Outdated
Show resolved
Hide resolved
Hi @Martin521. We've discussed this PR with the team yesterday. We are still on our low capacities but we don't want the PR to get stale, so we're thinking how to move on here. I resolved a few comments which were duplicates or were addressed. I kept a few where we still have some "uncanny feelings". You know, not very happy and confident but also without an immediate idea on how to make things better. Also, some comments mention that you've wanted to look at other options, so please comment on those. Let me ask you a few possibly annoying questions. Annoying because they might have popped up in some discussions already, but we want to summarize things a bit.
Thanks for your patience. |
37f4991
to
6550c08
Compare
Nothing annoying here. I will tackle the questions and also the open comments one by one in the coming days. |
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
WarnScopes
module. Seesrc/Compiler/SyntaxTree/WarnScopes.fsi
and 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