File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
server/server/src/main/kotlin/org/jetbrains/bsp/bazel/server/bsp/managers Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,17 @@ class BazelBspAspectsManager(
7777
7878 private fun List<RulesetLanguage>.addExternalPythonLanguageIfNeeded (externalRulesetNames : List <String >): List <RulesetLanguage > {
7979 val rulesetName = Language .Python .rulesetNames.firstOrNull { externalRulesetNames.contains(it) }
80- return this .filterNot { it.language == Language .Python } + RulesetLanguage (rulesetName, Language .Python )
80+ return when {
81+ bazelRelease.major >= 8 ->
82+ if (featureFlags.isPythonSupportEnabled) {
83+ this .filterNot { it.language == Language .Python } + RulesetLanguage (rulesetName, Language .Python )
84+ } else {
85+ this
86+ }
87+ else ->
88+ // For bazel version < 8, python is embedded.
89+ this .filterNot { it.language == Language .Python } + RulesetLanguage (rulesetName, Language .Python )
90+ }
8191 }
8292
8393 fun generateAspectsFromTemplates (
You can’t perform that action at this time.
0 commit comments