-
-
Notifications
You must be signed in to change notification settings - Fork 607
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
Move global variables related to diagnostics into a separate struct. #17007
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request and interest in making D better, @thewilsonator! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#17007" |
c797b71
to
44069a9
Compare
Please doublecheck that I have not messed up the headers |
I feel kind of uncomfortable to merge this without seeing what the next changes will look like. Are we going to have to pass a diagnostics object to all of the functions that use any sort of diagnostic? Shouldn't this be somehow part of the ErrorSink interface? |
Example: 12567e5
Not a requirement, my initial goal is to remove as much explicit reference to
I was originally going to move Also note that the state of |
44069a9
to
fbd4873
Compare
This doesn't look like the right direction to me. The goal is not to replace global.errors with local.errors, but to replace the whole error-counting gagging system with assigning a different error sink to a gagged scope.
dmd's error configuration parameters should eventually just be in |
Many modules
import dmd.globals;
to access only a set of these fields. This will enable further refactoring to both restrict imports ofdmd.globals
and to pass these parameters explicitly.