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

Commit

Permalink
[fix] project cache correctly deserializes kotlin modules
Browse files Browse the repository at this point in the history
fixup! [fix] project cache correctly deserializes kotlin modules
[fix] project cache correctly deserializes kotlin modules


Co-authored-by: Xuan Son Trinh <[email protected]>


Merge-request: BAZEL-MR-579
Merged-by: Marcin Abramowicz <[email protected]>
  • Loading branch information
abrams27 authored and Space Team committed Oct 19, 2023
1 parent 4e7bc03 commit cd64dbb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@


## [Unreleased]


### Fixes 🛠️

- Project cache correctly deserializes kotlin modules.

## [3.1.0] - 18.09.2023

### Security 🚨
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.jetbrains.bsp.bazel.server.sync.BazelPathsResolver
import org.jetbrains.bsp.bazel.server.sync.dependencytree.DependencyTree
import org.jetbrains.bsp.bazel.server.sync.languages.LanguagePlugin
import org.jetbrains.bsp.bazel.server.sync.languages.java.JavaLanguagePlugin
import org.jetbrains.bsp.bazel.server.sync.model.Label
import java.net.URI
import java.nio.file.Path

Expand All @@ -19,7 +20,7 @@ class KotlinLanguagePlugin(
KotlinBuildTarget(
languageVersion = languageVersion,
apiVersion = apiVersion,
associates = associates,
associates = associates.map { BuildTargetIdentifier(it.value) },
kotlincOptions = kotlincOptions
)
}
Expand All @@ -39,7 +40,7 @@ class KotlinLanguagePlugin(
return KotlinModule(
languageVersion = kotlinTargetInfo.languageVersion,
apiVersion = kotlinTargetInfo.apiVersion,
associates = kotlinTargetInfo.associatesList.map { BuildTargetIdentifier(it) },
associates = kotlinTargetInfo.associatesList.map { Label(it) },
kotlincOptions = kotlinTargetInfo.kotlincOptsList,
javaModule = javaLanguagePlugin.resolveModule(targetInfo)
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.jetbrains.bsp.bazel.server.sync.languages.kotlin

import ch.epfl.scala.bsp4j.BuildTargetIdentifier
import org.jetbrains.bsp.bazel.server.sync.languages.LanguageData
import org.jetbrains.bsp.bazel.server.sync.languages.java.JavaModule
import org.jetbrains.bsp.bazel.server.sync.model.Label

data class KotlinModule(
val languageVersion: String,
val apiVersion: String,
val kotlincOptions: List<String>,
val associates: List<BuildTargetIdentifier>,
val associates: List<Label>,
val javaModule: JavaModule?
) : LanguageData

0 comments on commit cd64dbb

Please sign in to comment.