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

Instance Constructors

  1. new BuildTargets()

Type Members

  1. case class InferredBuildTarget(jar: io.AbsolutePath, symbol: String, id: BuildTargetIdentifier) 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(id: BuildTargetIdentifier): Iterable[BuildTargetIdentifier]
  18. def buildTargetTransitiveSources(id: BuildTargetIdentifier): Iterator[io.AbsolutePath]
  19. val buildTargetsOrder: (BuildTargetIdentifier) => Int
  20. def canCompile(id: BuildTargetIdentifier): Boolean
  21. def checkIfGeneratedDir(path: io.AbsolutePath): Boolean
  22. def checkIfGeneratedSource(source: Path): Boolean
  23. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  26. def findByDisplayName(name: String): Option[BuildTarget]
  27. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  29. def inferBuildTarget(toplevels: Iterable[mtags.Symbol]): Option[InferredBuildTarget]
  30. def inferBuildTarget(source: io.AbsolutePath): Option[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.

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

    Returns the first build target containing this source file.

  36. def inverseSourcesBsp(source: io.AbsolutePath)(implicit ec: ExecutionContext): Future[Option[BuildTargetIdentifier]]
  37. def isInsideSourceRoot(path: io.AbsolutePath): Boolean
  38. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  39. def isInverseDependency(query: BuildTargetIdentifier, roots: List[BuildTargetIdentifier]): Boolean
  40. def isSourceFile(source: io.AbsolutePath): Boolean
  41. def javaTarget(id: BuildTargetIdentifier): Option[JavaTarget]
  42. def javaTargetRoot(buildTarget: BuildTargetIdentifier): Option[io.AbsolutePath]
  43. def jvmRunEnvironment(targetId: BuildTargetIdentifier): Option[JvmEnvironmentItem]
  44. def mappedFrom(path: io.AbsolutePath): Option[io.AbsolutePath]
  45. def mappedLineForClient(mappedPath: io.AbsolutePath, line: Int): Option[Int]
  46. def mappedLineForServer(mappedPath: io.AbsolutePath, line: Int): Option[Int]
  47. def mappedTo(path: io.AbsolutePath): Option[MappedSource]
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  50. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  51. def onCreate(source: io.AbsolutePath): Unit
  52. def originalInverseSourceItem(source: io.AbsolutePath): Option[io.AbsolutePath]
  53. def sbtAutoImports(path: io.AbsolutePath): Option[Seq[String]]

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

  54. 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

  55. def scalaTarget(id: BuildTargetIdentifier): Option[ScalaTarget]
  56. def scalaTargetRoot(buildTarget: BuildTargetIdentifier): Option[io.AbsolutePath]
  57. def scalaVersion(source: io.AbsolutePath): Option[String]
  58. def setTables(newTables: Tables): Unit
  59. def setWorkspaceDirectory(newWorkspace: io.AbsolutePath): Unit
  60. def sourceBuildTargets(sourceItem: io.AbsolutePath): Option[Iterable[BuildTargetIdentifier]]
  61. def sourceItems: Iterable[io.AbsolutePath]
  62. def sourceItemsToBuildTargets: Iterator[(io.AbsolutePath, java.lang.Iterable[BuildTargetIdentifier])]
  63. def sourceJarFile(sourceJarName: String): Option[io.AbsolutePath]
  64. def sourceRoots: Iterable[io.AbsolutePath]
  65. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  66. def targetClassDirectories(id: BuildTargetIdentifier): List[String]
  67. def targetClasspath(id: BuildTargetIdentifier): Option[List[String]]
  68. def targetData(id: BuildTargetIdentifier): Option[TargetData]
  69. def targetJarClasspath(id: BuildTargetIdentifier): Option[List[io.AbsolutePath]]
  70. def targetRoots(buildTarget: BuildTargetIdentifier): List[io.AbsolutePath]
  71. def toString(): String
    Definition Classes
    AnyRef → Any
  72. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  73. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  74. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  75. 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

Inherited from AnyRef

Inherited from Any

Ungrouped