Skip to content

[Diagnostics][NFC] Add support for using the %select format specifier… #26836

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
Aug 26, 2019

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Aug 26, 2019

… with StringRef args

Get rid of some redundant availability diagnostics as a result.

Resolves SR-10588

@owenv
Copy link
Contributor Author

owenv commented Aug 26, 2019

cc @brentdax (original reporter)

@beccadax beccadax self-requested a review August 26, 2019 05:26
@beccadax
Copy link
Contributor

I’m on vacation for a few days, so I’ll tag myself for a review when I get back, but if someone else wants to do it before me, feel free!

@beccadax
Copy link
Contributor

@swift-ci please smoke test

@jrose-apple
Copy link
Contributor

Do we want to still call it %select or something else?

Can you update docs/Diagnostics.md too?

@owenv
Copy link
Contributor Author

owenv commented Aug 26, 2019

@jrose-apple Good idea, I added a note to the documentation.

I considered naming this something else and ultimately decided against it. Because the diagnostics format language is custom, I think it's better to keep the number of specifiers small and easy to remember. If this particular pattern was more widespread it might make more sense to introduce %if, %ifnonempty, or something similar.

@jrose-apple
Copy link
Contributor

Looks good to me other than the comment about using it!

… with StringRef args

Get rid of some redundant availability diagnostics as a result.
@owenv owenv force-pushed the select_modifier_str_support branch from c820b9f to 486c7b8 Compare August 26, 2019 18:38
@jrose-apple
Copy link
Contributor

@swift-ci Please smoke test

@jrose-apple jrose-apple self-assigned this Aug 26, 2019
@jrose-apple jrose-apple merged commit 7e9e4b5 into swiftlang:master Aug 26, 2019
@jrose-apple
Copy link
Contributor

Thanks, @owenv! I wonder if there are more diagnostics that could benefit from this.

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