You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current SemanticdbExtractor in Scala3 doesn't extract `` Signature information, which represents the type information for class, method, type, and local value.
Without Signature information in extracted SemanticDB, devtools based on Semanticdb lacks some functionalities for Scala3.
For example, metals can't provide textDocument/implementation and type decorations features for scala3 project, we can't implement scalafix rules that depends on Signature information.
Some
data structures are already defined [here https://github.com/lampepfl/dotty/tree/b7d2a122555a6aa44cc7590852a80f12512c535e/compiler/src/dotty/tools/dotc/semanticdb]. They are copy-paste from generated code and adjusted for Scala3.
Semanticdb already have Union Type and Intersection Type
Extract Sginature information for Scala3
(details) Generate Semanticdb's data structures
As discussed here scalameta/scalameta#2367 , it would be a good first step to keep copy-and-paste and adjust the generated scala codes.
However, hand-crafting all those data-structure (because there's a lot of data structures that related to Signature) is tedious and it makes harder to catch-up new version of scalapb or new scalameta.proto.
Therefore, we'll create a project that generate the Scala code from scalameta.proto using Scalapb, and adjust them using scalafix (so that Scala3 compiler doesn't need to have dependency on scalapb-runtime.
The text was updated successfully, but these errors were encountered:
Background
Current
SemanticdbExtractor
in Scala3 doesn't extract `` Signature information, which represents the type information for class, method, type, and local value.Actually, from the following scala code,
symbols section will look like:
Scala 2
compared to Scala 3 which is missing all information about signatures.
Scala 3
(copied from scalameta/metals#2593 (reply in thread))
Without
Signature
information in extracted SemanticDB, devtools based on Semanticdb lacks some functionalities for Scala3.For example,
metals
can't providetextDocument/implementation
andtype decorations
features for scala3 project, we can't implement scalafix rules that depends on Signature information.TODOs
SymbolInformation
,ClassSignature
, and etc, see https://scalameta.org/docs/semanticdb/specification.html#data-model)data structures are already defined [here https://github.com/lampepfl/dotty/tree/b7d2a122555a6aa44cc7590852a80f12512c535e/compiler/src/dotty/tools/dotc/semanticdb]. They are copy-paste from generated code and adjusted for Scala3.
Union Type
andIntersection Type
Sginature
information for Scala3(details) Generate Semanticdb's data structures
As discussed here scalameta/scalameta#2367 , it would be a good first step to keep copy-and-paste and adjust the generated scala codes.
However, hand-crafting all those data-structure (because there's a lot of data structures that related to
Signature
) is tedious and it makes harder to catch-up new version ofscalapb
or newscalameta.proto
.Therefore, we'll create a project that generate the Scala code from
scalameta.proto
usingScalapb
, and adjust them usingscalafix
(so that Scala3 compiler doesn't need to have dependency onscalapb-runtime
.The text was updated successfully, but these errors were encountered: