scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

Add missing `SymbolInfomation` fields to Semanticdb

Open tanishiking opened this issue 4 years ago • 0 comments

Current ExtractSemanticDB in dotty extracts the following information for SymbolInformation, but there're some missing fields.

  • [x] symbol
  • [x] language
  • [x] kind
  • [x] properties
  • [x] displayName
  • [x] signature
    • Work in progress: https://github.com/lampepfl/dotty/issues/12766
  • [ ] annotations
  • [x] access https://github.com/lampepfl/dotty/pull/12964
  • [x] overridden_symbols https://github.com/lampepfl/dotty/pull/13295
  • [ ] documentation

https://github.com/lampepfl/dotty/blob/f33bc8df9bbdabb921fe70b0d136cb3fd4f25355/compiler/src/dotty/tools/dotc/semanticdb/ExtractSemanticDB.scala#L453-L460

message SymbolInformation {
  reserved 2, 6, 7, 8, 9, 10, 11, 12, 14, 15;
  string symbol = 1;
  Language language = 16;
  Kind kind = 3;
  int32 properties = 4;
  string display_name = 5;
  Signature signature = 17;
  repeated Annotation annotations = 13;
  Access access = 18;
  repeated string overridden_symbols = 19;
  Documentation documentation = 20;
}

https://scalameta.org/docs/semanticdb/specification.html#symbolinformation

Expectation

Dotty should extract all the fields of SymbolInformation.

(note that, documentation could be in lower priority IMO, since semanticdb plugin for scala2 also doesn't extract it and no tools depend on that information.

tanishiking avatar Jun 28 '21 06:06 tanishiking