Skip to content

Commit 6c60ea6

Browse files
committed
Handle relative path in dottyStyleMessage.
1 parent 9cb49ed commit 6c60ea6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

libs/javalib/worker/src/mill/javalib/zinc/TransformingReporter.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ private object TransformingReporter {
8282
InterfaceUtil.jo2o(pos.sourcePath()) match {
8383
case None => message
8484
case Some(path) =>
85-
val absPath = os.Path(path)
85+
val absPath = os.FilePath(path) match {
86+
case abs: os.Path => abs
87+
// Assume relative paths are relative to the current workspaceRoot
88+
case rel: os.RelPath => workspaceRoot / rel
89+
case sub: os.SubPath => workspaceRoot / sub
90+
}
8691
// Render paths within the current workspaceRoot as relative paths to cut down on verbosity
8792
val displayPath =
8893
if absPath.startsWith(workspaceRoot) then absPath.subRelativeTo(workspaceRoot).toString

0 commit comments

Comments
 (0)