The implicit <taskName>GetImports task will attempt to analyze the imports of a package, which fails with:
* What went wrong:
Execution failed for task ':pkldocGatherImports'.
> –– Pkl Error ––
Module URI `package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0` has invalid syntax.
The workaround for now is to set transitiveModules explicitly to something, which disables the GetImports task dependency.
To fix this: we only need to analyze the imports of file: URIs. There is little chance that non-file URIs can import file URIs, because Pkl's default security manager disallows this.
Originally created by @bioball on GitHub (Nov 8, 2024).
This is a regression:
In the following:
```kt
pkl {
pkldocGenerators {
register("pkldoc") {
sourceModules = listOf(uri("package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0"))
}
}
}
```
The implicit `<taskName>GetImports` task will attempt to analyze the imports of a package, which fails with:
```
* What went wrong:
Execution failed for task ':pkldocGatherImports'.
> –– Pkl Error ––
Module URI `package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0` has invalid syntax.
```
The workaround for now is to set `transitiveModules` explicitly to something, which disables the `GetImports` task dependency.
```kt
pkl {
pkldocGenerators {
register("pkldoc") {
sourceModules = listOf(uri("package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0"))
transitiveModules = files("some_file.txt")
}
}
}
```
To fix this: we only need to analyze the imports of `file:` URIs. There is little chance that non-file URIs can import file URIs, because Pkl's default security manager disallows this.
adam
added the bug label 2025-12-30 01:22:39 +01:00
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.
Originally created by @bioball on GitHub (Nov 8, 2024).
This is a regression:
In the following:
The implicit
<taskName>GetImportstask will attempt to analyze the imports of a package, which fails with:The workaround for now is to set
transitiveModulesexplicitly to something, which disables theGetImportstask dependency.To fix this: we only need to analyze the imports of
file:URIs. There is little chance that non-file URIs can import file URIs, because Pkl's default security manager disallows this.