-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add framework field to the scala-test-classes bsp's endpoint (#…
…1695) Build client can use information about the test framework of tests to provide better UX when running/debugging tests. More information can be found at build-server-protocol/build-server-protocol#296 (comment).
- Loading branch information
Showing
7 changed files
with
111 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
frontend/src/main/scala/bloop/bsp/ScalaTestSuitesResult.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package bloop.bsp | ||
|
||
import io.circe.derivation.JsonCodec | ||
import ch.epfl.scala.bsp.BuildTargetIdentifier | ||
import io.circe.derivation.deriveDecoder | ||
import io.circe.derivation.deriveEncoder | ||
import io.circe.Decoder | ||
import io.circe.Encoder | ||
import scala.meta.jsonrpc.Endpoint | ||
import ch.epfl.scala.bsp.ScalaTestClassesParams | ||
|
||
object ScalaTestClasses { | ||
val endpoint = new Endpoint[ScalaTestClassesParams, ScalaTestClassesResult]("buildTarget/scalaTestClasses") | ||
} | ||
|
||
final case class ScalaTestClassesResult( | ||
items: List[ScalaTestClassesItem] | ||
) | ||
|
||
object ScalaTestClassesResult { | ||
implicit val decoder: Decoder[ScalaTestClassesResult] = deriveDecoder | ||
implicit val encoder: Encoder[ScalaTestClassesResult] = deriveEncoder | ||
} | ||
|
||
final case class ScalaTestClassesItem( | ||
target: BuildTargetIdentifier, | ||
// Fully qualified names of test classes | ||
classes: List[String], | ||
// Name of the sbt's test framework | ||
framework: Option[String] | ||
) | ||
object ScalaTestClassesItem { | ||
implicit val decoder: Decoder[ScalaTestClassesItem] = deriveDecoder | ||
implicit val encoder: Encoder[ScalaTestClassesItem] = deriveEncoder | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters