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
Migrate to SwiftSyntax from SourceKitten #359
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix SwiftSyntax version to swift 5.2 Parse protocols in decl parser task Partially working solution for scanning classes and protocols. Ready to convert to proper visitor methods. Running unit tests with 2 sensible failures Don't check private properties Tests pass Needs to catch a private protocol Pass tests. No longer reports actual computed access level. Pass all tests Clean up local tracking Move imports parsing to AST task Move extensions into utility files Component extension works Pass tests; need refactor Remove structure from AST Remove ASTUtils. Remove import SourceKitten and clean up Move to base class Consolidate extensions Add license at header Renames and code organization Extract extension to removing leading module name Remove dependency on SourceKitten Remove dependency on SourceKitten
elsh
approved these changes
Oct 1, 2020
rudro
reviewed
Oct 2, 2020
rudro
approved these changes
Oct 2, 2020
rudro
approved these changes
Oct 8, 2020
...or/Sources/NeedleFramework/Parsing/Pluginized/Tasks/PluginizedASTDeclarationParserTask.swift
Outdated
Show resolved
Hide resolved
...or/Sources/NeedleFramework/Parsing/Pluginized/Tasks/PluginizedASTDeclarationParserTask.swift
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrate to SwiftSyntax from SourceKitten. The parsing code now has more context on the actual AST, instead of the previous heavily String-based API from SourceKit.
Architecture
The migration is done more like a refactor, so the overall Needle generator workflows haven't changed much.
Performance
After instrumenting with large amount of Swift files, this migration cuts down the needle generator runtime by 10% only. The majority of the tool's time is actually not on AST parsing, so further performance gains should come from elsewhere (File filters mostly).
Notes for reviewers
In this PR, the interesting files to look at are:
Followups