main.kotlin.org.jetbrains.bsp.protocol.InitializeBuildData.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bazel-bsp Show documentation
Show all versions of bazel-bsp Show documentation
An implementation of the Build Server Protocol for Bazel. Allows clients such as IntelliJ to obtain build
specific
information in order to improve the experience of users in the IDE.
package org.jetbrains.bsp.protocol
import kotlin.math.max
data class InitializeBuildData(
val clientClassesRootDir: String? = null,
val openTelemetryEndpoint: String? = null,
val featureFlags: FeatureFlags? = null,
)
data class FeatureFlags(
val isPythonSupportEnabled: Boolean = false,
val isAndroidSupportEnabled: Boolean = false,
val isGoSupportEnabled: Boolean = false,
val isRustSupportEnabled: Boolean = false,
val isPropagateExportsFromDepsEnabled: Boolean = true,
/** Bazel specific */
val bazelSymlinksScanMaxDepth: Int = 2,
) {
fun merge(anotherFeatureFlags: FeatureFlags): FeatureFlags =
FeatureFlags(
isPythonSupportEnabled = isPythonSupportEnabled || anotherFeatureFlags.isPythonSupportEnabled,
isAndroidSupportEnabled = isAndroidSupportEnabled || anotherFeatureFlags.isAndroidSupportEnabled,
isGoSupportEnabled = isGoSupportEnabled || anotherFeatureFlags.isGoSupportEnabled,
isRustSupportEnabled = isRustSupportEnabled || anotherFeatureFlags.isRustSupportEnabled,
isPropagateExportsFromDepsEnabled = isPropagateExportsFromDepsEnabled || anotherFeatureFlags.isPropagateExportsFromDepsEnabled,
bazelSymlinksScanMaxDepth = max(bazelSymlinksScanMaxDepth, anotherFeatureFlags.bazelSymlinksScanMaxDepth),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy