add pretty-printing of annotations on symbols#148
Merged
Conversation
f8db39d to
2e9025b
Compare
53 tasks
olafurpg
suggested changes
Apr 9, 2021
Contributor
olafurpg
left a comment
There was a problem hiding this comment.
Phenomenal work getting annotations working! SemanticDB has never properly supported annotations because they're too complicated to model in Scala. It's a fantastic breakthrough that we can properly support Java annotations.
A few comments, the most important ones relate to changes in the SemanticDB spec.
semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac/SemanticdbTypeVisitor.java
Show resolved
Hide resolved
lsif-semanticdb/src/main/java/com/sourcegraph/lsif_semanticdb/SignatureFormatter.java
Show resolved
Hide resolved
lsif-semanticdb/src/main/java/com/sourcegraph/lsif_semanticdb/SignatureFormatter.java
Show resolved
Hide resolved
semanticdb-javac/src/main/java/com/sourcegraph/semanticdb_javac/SemanticdbVisitor.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
Ive updated the PR description with the changes that arose from the review 🙂 @olafurpg |
a8e5910 to
e5f14a2
Compare
olafurpg
approved these changes
Apr 12, 2021
Contributor
olafurpg
left a comment
There was a problem hiding this comment.
Outstanding work 👏 This is ready to merge!
It would be good to followup soon with the upstream spec changes.
lsif-semanticdb/src/main/java/com/sourcegraph/lsif_semanticdb/SignatureFormatter.java
Outdated
Show resolved
Hide resolved
e419be0 to
2d36a96
Compare
2d36a96 to
f0c3556
Compare
Contributor
Author
|
Merging ahead of scalameta/scalameta#2281. We dont anticipate the PR to result in any byte-level breaking changes to what is being merged here |
48 tasks
This file contains hidden or 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
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.
Previously, symbols that had annotations did not render those in the formatter/pretty-printer.
This PR introduces 2 new semanticdb spec changes that need to be upstreamed:
AnnotationTreetype as part of theTreecollection.Annotationtype used inSymbolInformation(andAnnotatedType) while having the same index 1 field and an additional repeatedTreefield for parametersAssignTreetype as part of theTreecollection, for assignment expressions.In combination, these add support to semanticdb for modeling the full JLS annotation spec, which we utilize to pretty-print.
Follow-up PRs:
Add helper functions for building many of the semanticdb constructs add pretty-printing of annotations on symbols #148 (comment)✔️Move the✔️semanticdbXXXmethods inSemanticdbVisitorto a separate class add pretty-printing of annotations on symbols #148 (comment)