CANVE / extractor

Extracts and normalizes the type relationships and call graph of scala sbt projects.
4 stars 1 forks source link

Qualified ID enhance serialization format for human readability #7

Open matanox opened 8 years ago

matanox commented 8 years ago

A qualified ID type is currently used for giving symbols a unique name. It is composed of pairs of kind and name, e.g. (object, Foo). Sometimes extra pairs are also included such as in the case of function arguments - which are appended for function defs. Currently it is serialized using an ugly format that looks like (package|myPackage).(object|Foo).... It may be useful switching to a more smoothly humanly readable format, splitting into two strings, each more readable:

One string for just the names - e.g. package.Foo.apply.counter One string for just the kinds - e.g. package.object.method.value

This will be more productive for diagnostics.

P.S. this means two separate fields rather than currently one, could be:

case class QualifiedID(nameConcatenation: SomeType, kindConcatenation: SomeType) {
  def ...
}