Skip to content

Specify node names for diagnostics in gyb_syntax_support #654

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 31, 2022

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 30, 2022

This produces more meaningful, contextual diagnostics and removes a FIXME that we were maintaining node names for diagnostics in SwiftParser.


parameters = [
'name: "%s"' % node.syntax_kind,
'nameForDiagnostics: "%s"' % node.name_for_diagnostics or 'nil'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this being evaluated as ('nameForDiagnostics: "%s"' % node.name_for_diagnostics) or 'nil'? They're all "None" rather than nil 😅 .

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, that did actually get evaluate incorrectly and I didn’t catch it because I didn’t build generate-swift-syntax-builder locally.

Fixed it now.

@ahoppen ahoppen force-pushed the ahoppen/node-name-for-diagnostic branch from 4f22d13 to 04e39fa Compare August 30, 2022 09:39
@ahoppen ahoppen force-pushed the ahoppen/node-name-for-diagnostic branch from 04e39fa to 112e5d4 Compare August 31, 2022 16:00
@ahoppen
Copy link
Member Author

ahoppen commented Aug 31, 2022

swiftlang/swift#60847

@swift-ci Please test

@ahoppen ahoppen merged commit 4c0886e into swiftlang:main Aug 31, 2022
@ahoppen ahoppen deleted the ahoppen/node-name-for-diagnostic branch August 31, 2022 18:11
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.

2 participants