Skip to content

[swift-ide-test] Mimic SourceKit's setup when testing syntactic requests #28388

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

Conversation

nathawes
Copy link
Contributor

SourceKit doesn't set up a compiler instance, just a parser, for its syntactic requests (document structure and syntax coloring). This updates swift-ide-test to minic this setup to ensure the StructureAnnotator/PrintSyntaxColorWalker and underlying SyntaxModelWalker handle this setup (which has no type-checker installed) for all our swift-ide-test based tests.

This PR also factors out some common error handling code.

Resolves rdar://problem/57202584

@nathawes nathawes requested a review from rintaro November 20, 2019 21:10
@nathawes
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@nathawes
Copy link
Contributor Author

nathawes commented Dec 2, 2019

@swift-ci please test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

LGTM

Invocation.getTypeCheckerOptions(),
Invocation.getModuleName(),
SynTreeCreator,
Invocation.getMainFileSyntaxParsingCache());
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: Indent

@nathawes nathawes force-pushed the swift-ide-test-syntactic-walker-setup branch from eb0a01d to e0f63b1 Compare December 3, 2019 21:05
@nathawes
Copy link
Contributor Author

nathawes commented Dec 3, 2019

@swift-ci please test and merge

…tic requests

SourceKit doesn't set up a compiler instance, just a parser, for its syntactic
requests (document structure and syntax coloring). This updates swift-ide-test
to minic this setup to ensure the StructureAnnotator/PrintSyntaxColorWalker and
underlying SyntaxModelWalker handle this setup (which has no type-checker
installed) for all our swift-ide-test based tests.

Resolves rdar://problem/57202584
@nathawes nathawes force-pushed the swift-ide-test-syntactic-walker-setup branch from e0f63b1 to ddd714e Compare January 6, 2020 22:56
@nathawes
Copy link
Contributor Author

nathawes commented Jan 6, 2020

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jan 6, 2020

Build failed
Swift Test OS X Platform
Git Sha - eb0a01de25a7d3023da9cd850eb90654e3a7e68f

@swift-ci
Copy link
Contributor

swift-ci commented Jan 6, 2020

Build failed
Swift Test Linux Platform
Git Sha - eb0a01de25a7d3023da9cd850eb90654e3a7e68f

@nathawes nathawes merged commit 6b85e35 into swiftlang:master Jan 7, 2020
@nathawes nathawes deleted the swift-ide-test-syntactic-walker-setup branch January 7, 2020 01:59
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