-
Notifications
You must be signed in to change notification settings - Fork 307
Add support for semantic functionality in macro expansion reference documents #1634
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
Add support for semantic functionality in macro expansion reference documents #1634
Conversation
Since test cases are passing for nested macro expansion. I would like to assume that the issue with semantic functionality not working is due to vs code / extension. |
I will try to come up with test cases for semantic functionality. |
ead445c
to
2254675
Compare
@ahoppen This feature is complete now, I will work on the test cases. It would be nice if you can merge this and I can work on the test cases in a separate PR. Everything works now :) |
2254675
to
3021bbc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I think that the changes to MacroExpansionReferenceURLData
aren’t needed if #1636 ends up fixing the URL encoding issue with VS Code.
3021bbc
to
be824f5
Compare
@ahoppen ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
@swift-ci Please test |
@swift-ci Please test Windows |
@ahoppen what exactly causes the CI to fail? Is it due to the |
#1638 should fix the Swift 5.10 build by just not using bare slash regex literals. That way we don’t need to update the package manifest. Could you undo your package manifest change? The PR should be fine in CI without it because it has a Swift 6 compiler with bare slash regex literals enabled. |
Head branch was pushed to by a user without write access
be824f5
to
1792f59
Compare
@ahoppen I updated the PR as you said. Can you please trigger the CI once again? |
1792f59
to
71f3656
Compare
… & Nested Macro Expansions
71f3656
to
0784041
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
Reimplementation of #1610 after #1631
This PR migrates several requests made to sourcekitd to support Semantic Functionality in Macro Expansion Reference Documents.
What has been migrated and works?
cursorInfo
documentDiagnosticReport
openInterface
semanticTokens
relatedIdentifiers
(used bydocumentSymbolHighlight
)What has been migrated but doesn’t work?
inlayHints
(variableTypeInfo) probably needs a fix in sourcekitdWhat won't be migrated since they don't apply for reference documents?
Note:
Moreover, this PR also does the following:
Expansion of Swift Macros in Visual Studio Code - Google Summer Of Code 2024
@lokesh-tr @ahoppen @adam-fowler