Packages

final class BuildTargets extends AnyRef

In-memory cache for looking up build server metadata.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BuildTargets
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class InferredBuildTarget(jar: io.AbsolutePath, symbol: String, id: BuildTargetIdentifier, sourceJar: Option[io.AbsolutePath]) extends Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addData(data: TargetData): Unit
  5. def all: Iterator[BuildTarget]
  6. def allBuildTargetIds: Seq[BuildTargetIdentifier]
  7. def allInverseDependencies(target: BuildTargetIdentifier): Set[BuildTargetIdentifier]
  8. def allJava: Iterator[JavaTarget]
  9. def allScala: Iterator[ScalaTarget]
  10. def allSourceJars: Iterator[io.AbsolutePath]
  11. def allTargetRoots: Iterator[io.AbsolutePath]
  12. def allWorkspaceJars: Iterator[io.AbsolutePath]
  13. def allWritableData: List[TargetData]
  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def buildServerOf(id: BuildTargetIdentifier): Option[BuildServerConnection]
  16. def buildTargetSources(id: BuildTargetIdentifier): Iterable[io.AbsolutePath]
  17. def buildTargetTransitiveDependencies(ids: List[BuildTargetIdentifier]): Iterable[BuildTargetIdentifier]
  18. def buildTargetTransitiveDependencies(id: BuildTargetIdentifier): Iterable[BuildTargetIdentifier]
  19. def buildTargetTransitiveSources(id: BuildTargetIdentifier): Iterator[io.AbsolutePath]
  20. val buildTargetsOrder: (BuildTargetIdentifier) => Int
  21. def canCompile(id: BuildTargetIdentifier): Boolean
  22. def checkIfGeneratedDir(path: io.AbsolutePath): Boolean
  23. def checkIfGeneratedSource(source: Path): Boolean
  24. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. def findByDisplayName(name: String): Option[BuildTarget]
  28. def fullClasspath(id: BuildTargetIdentifier, cancelPromise: Promise[Unit])(implicit ec: ExecutionContext): Option[Future[List[io.AbsolutePath]]]
  29. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  31. def inferBuildTarget(toplevels: Iterable[mtags.Symbol]): Option[InferredBuildTarget]
  32. def inferBuildTarget(source: io.AbsolutePath): Option[BuildTargetIdentifier]
  33. def inferBuildTargets(source: io.AbsolutePath): List[BuildTargetIdentifier]

    Tries to guess what build target this readonly file belongs to from the symbols it defines.

    Tries to guess what build target this readonly file belongs to from the symbols it defines.

    By default, we rely on carefully recording what build target produced what files in the .metals/readonly/ directory. This approach has the problem that navigation failed to work in readonly/ sources if

    - a new metals feature forgot to record the build target - a user removes .metals/metals.h2.db

    When encountering an unknown readonly/ file we do the following steps to infer what build target it belongs to:

    - check if file is in .metals/readonly/dependencies/${source-jar-name} - find the build targets that have a sourceDependency with that name

    Otherwise if it's a jar file we find a build target it belongs to.

    This approach is not glamorous but it seems to work reasonably well.

  34. def info(id: BuildTargetIdentifier): Option[BuildTarget]
  35. def inverseDependencyLeaves(target: BuildTargetIdentifier): Set[BuildTargetIdentifier]
  36. def inverseDependencySource(sourceJar: io.AbsolutePath): Set[BuildTargetIdentifier]
  37. def inverseSourceItem(source: io.AbsolutePath): Option[io.AbsolutePath]
  38. def inverseSources(source: io.AbsolutePath): Option[BuildTargetIdentifier]

    Returns the first build target containing this source file.

  39. def inverseSourcesAll(source: io.AbsolutePath): List[BuildTargetIdentifier]

    Returns all build targets containing this source file.

  40. def inverseSourcesBsp(source: io.AbsolutePath)(implicit ec: ExecutionContext): Future[Option[BuildTargetIdentifier]]
  41. def inverseSourcesBspAll(source: io.AbsolutePath)(implicit ec: ExecutionContext): Future[List[BuildTargetIdentifier]]
  42. def isInsideSourceRoot(path: io.AbsolutePath): Boolean
  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. def isInverseDependency(query: BuildTargetIdentifier, roots: List[BuildTargetIdentifier]): Boolean
  45. def isSourceFile(source: io.AbsolutePath): Boolean
  46. def javaTarget(id: BuildTargetIdentifier): Option[JavaTarget]
  47. def javaTargetRoot(buildTarget: BuildTargetIdentifier): Option[io.AbsolutePath]
  48. def jvmTarget(id: BuildTargetIdentifier): Option[JvmTarget]
  49. def mappedFrom(path: io.AbsolutePath): Option[io.AbsolutePath]
  50. def mappedLineForClient(mappedPath: io.AbsolutePath, line: Int): Option[Int]
  51. def mappedLineForServer(mappedPath: io.AbsolutePath, line: Int): Option[Int]
  52. def mappedTo(path: io.AbsolutePath): Option[MappedSource]
  53. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  54. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  55. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  56. def onCreate(source: io.AbsolutePath): Unit
  57. def originalInverseSourceItem(source: io.AbsolutePath): Option[io.AbsolutePath]
  58. def possibleScalaVersions(source: io.AbsolutePath): List[String]
  59. def removeData(data: TargetData): Unit
  60. def sbtAutoImports(path: io.AbsolutePath): Option[Seq[String]]

    Resolves sbt auto imports if a file belongs to a Sbt build target.

  61. def sbtBuildScalaTarget(file: io.AbsolutePath): Option[BuildTargetIdentifier]

    Returns meta build target for *.sbt or *.scala files.

    Returns meta build target for *.sbt or *.scala files. It selects build target by directory of its connection because *.sbt and *.scala aren't included in sourceFiles set

  62. def scalaTarget(id: BuildTargetIdentifier): Option[ScalaTarget]
  63. def scalaTargetRoot(buildTarget: BuildTargetIdentifier): Option[io.AbsolutePath]
  64. def scalaVersion(source: io.AbsolutePath): Option[String]
  65. def sourceBuildTargets(sourceItem: io.AbsolutePath): Option[Iterable[BuildTargetIdentifier]]
  66. def sourceItems: Iterable[io.AbsolutePath]
  67. def sourceItemsToBuildTargets: Iterator[(io.AbsolutePath, java.lang.Iterable[BuildTargetIdentifier])]
  68. def sourceJarFor(jar: io.AbsolutePath): Option[io.AbsolutePath]
  69. def sourceJarFor(id: BuildTargetIdentifier, jar: io.AbsolutePath): Option[io.AbsolutePath]
  70. def sourceRoots: Iterable[io.AbsolutePath]
  71. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  72. def targetClassDirectories(id: BuildTargetIdentifier): List[String]
  73. def targetClasspath(id: BuildTargetIdentifier, cancelPromise: Promise[Unit])(implicit executionContext: ExecutionContext): Option[Future[List[String]]]
  74. def targetData(id: BuildTargetIdentifier): Option[TargetData]
  75. def targetJarClasspath(id: BuildTargetIdentifier): Option[List[io.AbsolutePath]]
  76. def targetRoots(buildTarget: BuildTargetIdentifier): List[io.AbsolutePath]
  77. def toString(): String
    Definition Classes
    AnyRef → Any
  78. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  79. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  80. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  81. def workspaceDirectory(buildTarget: BuildTargetIdentifier): Option[io.AbsolutePath]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def sourceJarFile(sourceJarName: String): Option[io.AbsolutePath]
    Annotations
    @deprecated
    Deprecated

    This might return false positives since names of jars could repeat.

Inherited from AnyRef

Inherited from Any

Ungrouped