Skip to content

Commit

Permalink
Replace String with Path
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszwawrzyk committed Mar 13, 2020
1 parent 113bed0 commit fd1d50e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/src/main/scala/bloop/config/Config.scala
Expand Up @@ -234,7 +234,7 @@ object Config {
workspaceDir: Option[Path],
sources: List[Path],
sourcesGlobs: Option[List[SourcesGlobs]],
sourceRoots: Option[List[String]],
sourceRoots: Option[List[Path]],
dependencies: List[String],
classpath: List[Path],
out: Path,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main/scala/bloop/bsp/BloopBspServices.scala
Expand Up @@ -948,7 +948,7 @@ final class BloopBspServices(
// TODO(jvican): Don't default on false for generated, add this info to JSON fields
bsp.SourceItem(bsp.Uri(bspUri), kind, false)
}
val roots = project.sourceRoots.map(_.map(bsp.Uri(_)))
val roots = project.sourceRoots.map(_.map(p => bsp.Uri(p.toBspUri)))
bsp.SourcesItem(target, items, roots)
}
}.toList
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/main/scala/bloop/data/Project.scala
Expand Up @@ -44,7 +44,7 @@ final case class Project(
javacOptions: List[String],
sources: List[AbsolutePath],
sourcesGlobs: List[SourcesGlobs],
sourceRoots: Option[List[String]],
sourceRoots: Option[List[AbsolutePath]],
testFrameworks: List[Config.TestFramework],
testOptions: Config.TestOptions,
out: AbsolutePath,
Expand Down Expand Up @@ -235,6 +235,8 @@ object Project {
.getOrElse(out.resolve(Config.Project.analysisFileName(project.name)))
val resources = project.resources.toList.flatten.map(AbsolutePath.apply)

val sourceRoots = project.sourceRoots.map(_.map(AbsolutePath.apply))

Project(
project.name,
AbsolutePath(project.directory),
Expand All @@ -249,7 +251,7 @@ object Project {
project.java.map(_.options).getOrElse(Nil),
project.sources.map(AbsolutePath.apply),
SourcesGlobs.fromConfig(project, logger),
project.sourceRoots,
sourceRoots,
project.test.map(_.frameworks).getOrElse(Nil),
project.test.map(_.options).getOrElse(Config.TestOptions.empty),
AbsolutePath(project.out),
Expand Down

0 comments on commit fd1d50e

Please sign in to comment.