mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
[PR #821] [MERGED] Exclude non file-based modules from synthesized *GatherImports task #758
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/821
Author: @bioball
Created: 11/17/2024
Status: ✅ Merged
Merged: 11/18/2024
Merged by: @bioball
Base:
main← Head:transitive-modules-fix📝 Commits (2)
da7871aExclude non file-based modules from synthesized *GatherImports task487c5b9Fix bug when generating pkldoc on Windows📊 Changes
7 files changed (+216 additions, -134 deletions)
View changed files
📝
pkl-doc/src/main/kotlin/org/pkl/doc/DocGenerator.kt(+1 -1)📝
pkl-gradle/src/main/java/org/pkl/gradle/PklPlugin.java(+36 -3)📝
pkl-gradle/src/main/java/org/pkl/gradle/task/BasePklTask.java(+3 -102)📝
pkl-gradle/src/main/java/org/pkl/gradle/task/ModulesTask.java(+4 -26)➕
pkl-gradle/src/main/java/org/pkl/gradle/utils/PluginUtils.java(+128 -0)➕
pkl-gradle/src/main/java/org/pkl/gradle/utils/package-info.java(+4 -0)📝
pkl-gradle/src/test/kotlin/org/pkl/gradle/PkldocGeneratorsTest.kt(+40 -2)📄 Description
This fixes an issue where certain modules tasks fail due to the plugin attempting to analyze their imports, but the arguments may not actually be Pkl modules.
For example, the pkldoc task accepts entire packages in its "sourceMoules" property.
This changes the gather imports logic to only analyze file-based modules. This is also a performance improvement; non file-based modules are unlikely to import files due to insufficient trust levels.
Closes https://github.com/apple/pkl/issues/791
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.