All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.kotlin.org.jetbrains.bsp.protocol.InitializeBuildData.kt Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 3.2.0-20241118-a099775e0-NIGHTLY
Show newest version
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