Skip to content

Commit

Permalink
Avoid resolving paths on fragments (#357)
Browse files Browse the repository at this point in the history
Fixes an issue where modules with fragment paths are resolved against the URI path.
  • Loading branch information
holzensp authored Mar 26, 2024
1 parent c9ed183 commit e347b26
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkl-doc/src/main/kotlin/org/pkl/doc/DocPackageInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ data class DocPackageInfo(
"pkl:/" -> "pkl:${moduleName.substring(4)}".toUri()
else -> {
val path = getModulePath(moduleName, moduleNamePrefix).uriEncoded + ".pkl"
URI(importUri).resolve(path)
URI(importUri + path)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 id="declaration-title">birds.Bird<span id="declaration-version">0.5.0</span>
<div class="member-signature">open module <span class="name-decl">birds.Bird</span></div>
<dl class="member-info">
<dt class="">Module URI:</dt>
<dd><span class="import-uri">package://localhost:0/Bird.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dd><span class="import-uri">package://localhost:0/[email protected]#/Bird.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dt class="">Source code:</dt>
<dd><a href="https://example.com/birds/v0.5.0/blob/Bird.pkl">Bird.pkl</a></dd>
<dt class="runtime-data hidden">Known subtypes:</dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 id="declaration-title">birds.allFruit<span id="declaration-version">0.5.0</s
<div class="member-signature">module <span class="name-decl">birds.allFruit</span></div>
<dl class="member-info">
<dt class="">Module URI:</dt>
<dd><span class="import-uri">package://localhost:0/allFruit.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dd><span class="import-uri">package://localhost:0/[email protected]#/allFruit.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dt class="">Source code:</dt>
<dd><a href="https://example.com/birds/v0.5.0/blob/allFruit.pkl">allFruit.pkl</a></dd>
<dt class="runtime-data hidden">Known subtypes:</dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 id="declaration-title">birds.catalog<span id="declaration-version">0.5.0</sp
<div class="member-signature">module <span class="name-decl">birds.catalog</span></div>
<dl class="member-info">
<dt class="">Module URI:</dt>
<dd><span class="import-uri">package://localhost:0/catalog.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dd><span class="import-uri">package://localhost:0/[email protected]#/catalog.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dt class="">Source code:</dt>
<dd><a href="https://example.com/birds/v0.5.0/blob/catalog.pkl">catalog.pkl</a></dd>
<dt class="runtime-data hidden">Known subtypes:</dt>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 id="declaration-title">fruit.Fruit<span id="declaration-version">1.1.0</span
<div class="member-signature">module <span class="name-decl">fruit.Fruit</span></div>
<dl class="member-info">
<dt class="">Module URI:</dt>
<dd><span class="import-uri">package://localhost:0/Fruit.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dd><span class="import-uri">package://localhost:0/[email protected]#/Fruit.pkl</span><i class="copy-uri-button material-icons">content_copy</i></dd>
<dt class="runtime-data hidden">Known subtypes:</dt>
<dd id="known-subtypes" class="runtime-data hidden"></dd>
<dt class="runtime-data hidden">Known usages:</dt>
Expand Down

0 comments on commit e347b26

Please sign in to comment.