Utility to load relative paths from a classpath.
An index to lookup the definition of global symbols.
An index to lookup the definition of global symbols.
Only indexes plain Scala and Java source files, no compilation needed.
Maps MD5 fingerprints to full text contents.
An implementation of GlobalSymbolIndex with fast indexing and low memory usage.
An implementation of GlobalSymbolIndex with fast indexing and low memory usage.
Fast indexing is enabled by ScalaToplevelMtags, a custom parser that extracts only toplevel symbols from a Scala source file. Java source files don't need indexing because their file location can be inferred from the symbol with the limitation that it doesn't work for Java source files with multiple package-private top-level classes.
Low memory usage is enabled by only storing "non-trivial toplevel" symbols.
A symbol is "toplevel" when its owner is a package. A symbol is "non-trivial"
when it doesn't match the path of the file it's defined in, for example Some#
in Option.scala is non-trivial while Option#
in Option.scala is trivial.
keys are non-trivial toplevel symbols and values are the file the symbols are defined in.
keys are global symbols and the values are the files the symbols are defined in. Difference between toplevels and definitions is that toplevels contains only symbols generated by ScalaToplevelMtags while definitions contains only symbols generated by ScalaMtags.
Utility to generate method symbol disambiguators according to SemanticDB spec.
Utility to generate method symbol disambiguators according to SemanticDB spec.
See https://scalameta.org/docs/semanticdb/specification.html#scala-symbol
Custom parser that extracts toplevel members from a Scala source file.
Custom parser that extracts toplevel members from a Scala source file.
Example input:
package com.zoo class Animal { class Dog } object Park { trait Bench }
emits the following symbols: com/zoo/Animal# and com/zoo/Park. The inner classes Animal.Dog and Park.Bench are ignored.
This class exists for performance reasons. The ScalaMtags indexer provides the same functionality but it is much slower. Performance is important because toplevel symbol indexing is on a critical path when users import a new project.
Represents a unique definitions such as a Scala val
, object
, class
, or Java field/method.
Represents a unique definitions such as a Scala val
, object
, class
, or Java field/method.
Examples:
"scala/Predef.String#" "scala/collection/immutable/`::`#" "scala/Option#get()." "scala/Option.apply()."
Utility to print helpful messages for parse errors.
Utility to load relative paths from a classpath.
Provides similar functionality as URLClassLoader but uses idiomatic Scala data structures like
AbsolutePath
andOption[T]
instead ofjava.net.URL
and nulls.