Skip to content

[Diagnostics] Move macros used in diagnostic definitions to their own header #27795

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

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Oct 19, 2019

These were duplicated in 11 different files, and as they've gotten more complex a few inconsistencies have snuck in. Sharing them should make future changes easier and less bug-prone.

#undef ERROR
#undef FIXIT

#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be a good idea to keep this in the same header with a define to indicate that you want them undefined. That way they can be kept in sync. That said, new levels are unlikely to be introduced, so perhaps the complexity isnt worth it. Something to consider still.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I'm still considering whether or not to extend these as part of some related diagnostics work. I think it's best to leave them as separate headers for now to keep things simple, but I'll reevaluate if it gets any more complicated.

@owenv owenv force-pushed the diag_macro_refactor branch from 3d6b9cf to 0b09379 Compare January 29, 2020 00:25
@owenv
Copy link
Contributor Author

owenv commented Jan 29, 2020

@swift-ci please test

@owenv owenv requested a review from compnerd January 29, 2020 00:27
@CodaFi
Copy link
Contributor

CodaFi commented Apr 15, 2020

LGTM

Please rebase this and we'll get it merged.

@owenv owenv force-pushed the diag_macro_refactor branch from 0b09379 to 161f4d0 Compare April 15, 2020 01:09
… header

These were duplicated in 11 different files, and as they've gotten more
complex a few inconsistencies have snuck in. Sharing them should make future
changes easier and less bug-prone.
@owenv owenv force-pushed the diag_macro_refactor branch from 161f4d0 to fdb6eab Compare April 15, 2020 01:10
@owenv
Copy link
Contributor Author

owenv commented Apr 15, 2020

@CodaFi thanks for the reminder

@swift-ci please smoke test

@owenv
Copy link
Contributor Author

owenv commented Apr 15, 2020

@swift-ci smoke test

@owenv
Copy link
Contributor Author

owenv commented Apr 15, 2020

@swift-ci smoke test macOS

@owenv
Copy link
Contributor Author

owenv commented Apr 15, 2020

@swift-ci test Windows

1 similar comment
@owenv
Copy link
Contributor Author

owenv commented Apr 15, 2020

@swift-ci test Windows

@owenv
Copy link
Contributor Author

owenv commented Apr 17, 2020

Merging this since it's a fairly mechanical change. Happy to address any feedback in a follow-up PR

@owenv owenv merged commit 342e53f into swiftlang:master Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants