Skip to content

Commit 4e1042d

Browse files
committed
use File.pathSeparator for classpath in genDocs and dottydocs
- use File.pathSeparator instead of hard-coded path separator `:` => this way Windows user can run the command as well
1 parent 771d4c4 commit 4e1042d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

project/Build.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ object Build {
366366

367367
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
368368
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
369-
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
369+
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(File.pathSeparator)
370+
val docClasspath = dottyLib + File.pathSeparator + dottyInterfaces + File.pathSeparator + otherDeps
370371
val sources =
371372
(unmanagedSources in (Compile, compile)).value ++
372373
(unmanagedSources in (`dotty-compiler`, Compile)).value
@@ -375,7 +376,7 @@ object Build {
375376
"-project", "Dotty",
376377
"-project-version", dottyVersion,
377378
"-project-url", dottyGithubUrl,
378-
"-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps"
379+
"-classpath", docClasspath
379380
)
380381
(runMain in Compile).toTask(
381382
s""" dotty.tools.dottydoc.Main ${args.mkString(" ")} ${sources.mkString(" ")}"""
@@ -386,8 +387,9 @@ object Build {
386387
val args: Seq[String] = spaceDelimited("<arg>").parsed
387388
val dottyLib = (packageAll in `dotty-compiler`).value("dotty-library")
388389
val dottyInterfaces = (packageAll in `dotty-compiler`).value("dotty-interfaces")
389-
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(":")
390-
val cp: Seq[String] = Seq("-classpath", s"$dottyLib:$dottyInterfaces:$otherDeps")
390+
val otherDeps = (dependencyClasspath in Compile).value.map(_.data).mkString(File.pathSeparator)
391+
val docClasspath = dottyLib + File.pathSeparator + dottyInterfaces + File.pathSeparator + otherDeps
392+
val cp: Seq[String] = Seq("-classpath", docClasspath)
391393
(runMain in Compile).toTask(s""" dotty.tools.dottydoc.Main ${cp.mkString(" ")} """ + args.mkString(" "))
392394
}.evaluated,
393395

0 commit comments

Comments
 (0)