File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
compiler/src/dotty/tools/dotc/semanticdb Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -158,15 +158,16 @@ object ExtractSemanticDB {
158
158
val name : String = " extractSemanticDB"
159
159
160
160
def write (source : SourceFile , occurrences : List [SymbolOccurrence ])(given ctx : Context ): Unit =
161
- val sourcePath = source.file.jpath
162
- val sourceRoot = Paths .get(ctx.settings.sourceroot.value)
161
+ def absolutePath (path : Path ): Path = path.toAbsolutePath.normalize
162
+ val sourcePath = absolutePath(source.file.jpath)
163
+ val sourceRoot = absolutePath(Paths .get(ctx.settings.sourceroot.value))
163
164
val targetRoot =
164
165
val targetRootSetting = ctx.settings.targetroot.value
165
- if targetRootSetting.isEmpty then ctx.settings.outputDir.value.jpath
166
- else Paths .get(targetRootSetting)
167
- println(i " extract from $sourcePath from $sourceRoot, targetRoot = $targetRoot" )
166
+ absolutePath(
167
+ if targetRootSetting.isEmpty then ctx.settings.outputDir.value.jpath
168
+ else Paths .get(targetRootSetting)
169
+ )
168
170
val relPath = sourceRoot.relativize(sourcePath)
169
- println(i " relPath = $relPath" )
170
171
val relURI = relPath.iterator().asScala.mkString(" /" )
171
172
val outpath = targetRoot
172
173
.resolve(" META-INF" )
You can’t perform that action at this time.
0 commit comments