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.
This commit updates the SemanticDB tests to assert that the output from
converting TASTy to SemanticDB is the same as the SemanticDB produced by
the semanticdb-scalac compiler plugin for Scala 2.12.7. Test failures
report a diff like this:
The "tasty" output is currently identical to the original source file
because the TASTy to SemanticDB converter doesn't do anything.
Once the converter is updated to emit
SymbolOccurrence
(https://scalameta.org/docs/semanticdb/specification.html#symboloccurrence)
then the "tasty" output will include inline comments like
class Example /* pkg/Example# */
that can be read as "the symbolpkg/Example#
was resolved next to the identifier on the left".The spec for SemanticDB symbols can be found here:
To run the tests you must first produce the SemanticDB files for the
semanticdb/input project by running the following commands:
It's possible to include the semanticdb/input project in the main Dotty
build but I tried to limit the number of changes to the main build.
We use the org.scalameta:semanticdb_2.12 dependency to construct
SemanticDB data structures. If there is interest it's possible to
replace that dependency with a pure-Java module. I don't estimate it's a
lot of work, I have just never used the Java protobuf binding generator.