Skip to content

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

Merged
nathawes merged 1 commit into
swiftlang:masterfrom
nathawes:swift-ide-test-syntactic-walker-setup
Jan 7, 2020
Merged

[swift-ide-test] Mimic SourceKit's setup when testing syntactic requests#28388
nathawes merged 1 commit into
swiftlang:masterfrom
nathawes:swift-ide-test-syntactic-walker-setup

Conversation

@nathawes
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@swift-ci please test

1 similar comment
@nathawes
Copy link
Copy Markdown
Contributor Author

nathawes commented Dec 2, 2019

@swift-ci please test

Copy link
Copy Markdown
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

Comment thread tools/swift-ide-test/swift-ide-test.cpp Outdated
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

nathawes commented Jan 6, 2020

@swift-ci please test

@swift-ci
Copy link
Copy Markdown
Contributor

swift-ci commented Jan 6, 2020

Build failed
Swift Test OS X Platform
Git Sha - eb0a01de25a7d3023da9cd850eb90654e3a7e68f

@swift-ci
Copy link
Copy Markdown
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