Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
[fix] Kotlin is set to have higher precedence than Java to always ret…
Browse files Browse the repository at this point in the history
…urn Kotlin data object if exists.

Merge-request: BAZEL-MR-670
Merged-by: Xuan Son Trinh <xuanson.trinh@jetbrains.com>
  • Loading branch information
xuansontrinh authored and qodana-bot committed Nov 28, 2023
1 parent e6ad2a0 commit 9915acf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class BspProjectMapper(
val label = BspMappings.toBspId(module)
val dependencies =
module.directDependencies.map(BspMappings::toBspId)
val languages = module.languages.flatMap(Language::allNames)
val languages = module.languages.flatMap(Language::allNames).distinct()
val capabilities = inferCapabilities(module)
val tags = module.tags.mapNotNull(BspMappings::toBspTag)
val baseDirectory = BspMappings.toBspUri(module.baseDirectory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class LanguagePluginsService(

fun getPlugin(languages: Set<Language>): LanguagePlugin<*> =
when {
languages.contains(Language.KOTLIN) -> kotlinLanguagePlugin
languages.contains(Language.SCALA) -> scalaLanguagePlugin
languages.contains(Language.JAVA) -> javaLanguagePlugin
languages.contains(Language.KOTLIN) -> kotlinLanguagePlugin
languages.contains(Language.CPP) -> cppLanguagePlugin
languages.contains(Language.THRIFT) -> thriftLanguagePlugin
languages.contains(Language.PYTHON) -> pythonLanguagePlugin
Expand Down

0 comments on commit 9915acf

Please sign in to comment.