Skip to content

[sourcekit] Send compile notifications when argument parsing files #16895

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 3 commits into from
May 30, 2018

Conversation

benlangmuir
Copy link
Contributor

When swift command-line argument parsing fails in sourcekit, make sure we can still send a compile notification including the diagnostic about the incorrect arguments.

rdar://39225180

…g fails

For now we don't get a diagnostic, but at least there is a will-compile
containing the arguments.
… any reason

Refactors the diagnostic code to be run whenever a compilation
notification has been started and there are diagnostics available in the
consumer. This allows us to capture diagnostics on all exit paths, and
specifically when code-completion fails because of invalid arguments.

Note: the editor.open code path still doesn't report invalid arguments
because it fails before even trying to create an AST.
…ditor.open

Since we will not reach `createAST` where we would normally send the
notification, send one from `getInvocation` when it fails.

rdar://39225180
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir benlangmuir merged commit ad442e9 into swiftlang:master May 30, 2018
@benlangmuir benlangmuir deleted the notify-parse-args branch May 30, 2018 19:45
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.

1 participant