The more principled solution is to have importUri be a URI instead of a String and to test its scheme.
Generally, the problem is that URI::resolve can not assume fragments to be a path (and that it discards fragments altogether).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/357
**Author:** [@holzensp](https://github.com/holzensp)
**Created:** 3/22/2024
**Status:** ✅ Merged
**Merged:** 3/26/2024
**Merged by:** [@bioball](https://github.com/bioball)
**Base:** `main` ← **Head:** `pholzenspies/docPackageUriFix`
---
### 📝 Commits (1)
- [`bfb053f`](https://github.com/apple/pkl/commit/bfb053fc8a59fb79fb2724ed6f74f6139e828558) Avoid resolving paths on fragments
### 📊 Changes
**5 files changed** (+5 additions, -5 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-doc/src/main/kotlin/org/pkl/doc/DocPackageInfo.kt` (+1 -1)
📝 `pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/birds/0.5.0/Bird/index.html` (+1 -1)
📝 `pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/birds/0.5.0/allFruit/index.html` (+1 -1)
📝 `pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/birds/0.5.0/catalog/index.html` (+1 -1)
📝 `pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/fruit/1.1.0/Fruit/index.html` (+1 -1)
</details>
### 📄 Description
The more principled solution is to have `importUri` be a `URI` instead of a `String` and to test its scheme.
Generally, the problem is that `URI::resolve` can not assume fragments to be a path (and that it discards fragments altogether).
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/357
Author: @holzensp
Created: 3/22/2024
Status: ✅ Merged
Merged: 3/26/2024
Merged by: @bioball
Base:
main← Head:pholzenspies/docPackageUriFix📝 Commits (1)
bfb053fAvoid resolving paths on fragments📊 Changes
5 files changed (+5 additions, -5 deletions)
View changed files
📝
pkl-doc/src/main/kotlin/org/pkl/doc/DocPackageInfo.kt(+1 -1)📝
pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/birds/0.5.0/Bird/index.html(+1 -1)📝
pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/birds/0.5.0/allFruit/index.html(+1 -1)📝
pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/birds/0.5.0/catalog/index.html(+1 -1)📝
pkl-doc/src/test/files/DocGeneratorTest/output/localhost:0/fruit/1.1.0/Fruit/index.html(+1 -1)📄 Description
The more principled solution is to have
importUribe aURIinstead of aStringand to test its scheme.Generally, the problem is that
URI::resolvecan not assume fragments to be a path (and that it discards fragments altogether).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.