Emulates dependencyClasspath without triggering compilation of dependent projects.
Emulates dependencyClasspath without triggering compilation of dependent projects.
Why do we do this instead of a simple productDirectories ++ libraryDependencies?
We want the classpath to have the correct topological order of the project dependencies.
These config settings can be applied in configuration that have not yet been enabled in a project.
These config settings can be applied in configuration that have not yet
been enabled in a project. Therefore, their implementations must protect
themselves fro depending on tasks that do not exist in the scope (which
happens when the configuration is disabled but a task refers to it
nonetheless). See an example in the definition of bloopInternalClasspath
or the implementation of bloopGenerate.
Replace the implementation of discovered sbt plugins so that we don't run it
when we bloopGenerate or bloopInstall.
Replace the implementation of discovered sbt plugins so that we don't run it
when we bloopGenerate or bloopInstall. This is important because when there
are sbt plugins in the build they trigger the compilation of all the modules.
We do no-op when there is indeed an sbt plugin in the build.
Detect the eligible configuration dependencies from a given configuration.
Detect the eligible configuration dependencies from a given configuration.
A configuration is elibile if the project defines it and bloopGenerate
exists for it. Otherwise, the configuration dependency is ignored.
This is required to prevent transitive configurations like Runtime from
generating useless bloop configuration files and possibly incorrect project
dependencies. For example, if we didn't do this then the dependencies of
IntegrationTest would be projectName-runtime and projectName-compile,
whereas the following logic will return only the configuration Compile
so that the use site of this function can create the project dep
projectName-compile.
Find nativelib jar on the classpath.
Find nativelib jar on the classpath. Copy pasted from Scala native.
Find nativelib jar on the classpath.
Find nativelib jar on the classpath. Copy pasted from Scala native.
Extract the information that we need to configure forking for run or test.
Creates a project name from a classpath dependency and its configuration.
Creates a project name from a classpath dependency and its configuration.
This function uses internal sbt utils (sbt.Classpaths) to parse configuration
dependencies like sbt does and extract them. This parsing only supports compile
and test, any kind of other dependency will be assumed to be test and will be
reported to the user.
Ref https://www.scala-sbt.org/1.x/docs/Library-Management.html#Configurations.
Create a "proxy" for a setting that will allow us to inspect its value even though its not accessed from the same classloader.
Create a "proxy" for a setting that will allow us to inspect its value even though its not accessed from the same classloader. This is required to access Scala.js settings whose return type is Scala.js-specific and only lives in their classloader. Returns none if the key wasn't found with the id and type of class passed in.
Replace any old path that is used as a scalac option by the new path.
Replace any old path that is used as a scalac option by the new path.
This will make the code correct in the case sbt has references to the classes directory in the scalac option parameter.