mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
[PR #695] [MERGED] Add analyze imports libs (SPICE-0001) #680
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/695
Author: @bioball
Created: 10/16/2024
Status: ✅ Merged
Merged: 10/23/2024
Merged by: @bioball
Base:
main← Head:get-imports-command📝 Commits (10+)
d3493c9Add import analyzerd0ef1f7Add Gradle support for analyze125814bAdd documentation89f2f6fTouchupsfc63be4Apply suggestions from code review048fd43Cleanup codeb9572a4Update docs/modules/pkl-cli/pages/index.adocc72c877Updates7b93523Address more PR commentsd4ef31eAddress more PR comments📊 Changes
53 files changed (+2052 additions, -51 deletions)
View changed files
📝
docs/modules/language-reference/pages/index.adoc(+3 -2)📝
docs/modules/pkl-cli/pages/index.adoc(+52 -2)📝
docs/modules/pkl-cli/partials/cli-common-options.adoc(+0 -1)📝
docs/modules/pkl-gradle/pages/index.adoc(+58 -5)📝
docs/modules/pkl-gradle/partials/gradle-common-properties.adoc(+0 -1)📝
docs/modules/pkl-gradle/partials/gradle-modules-properties.adoc(+8 -2)➕
pkl-cli/src/main/kotlin/org/pkl/cli/CliImportAnalyzer.kt(+79 -0)➕
pkl-cli/src/main/kotlin/org/pkl/cli/CliImportAnalyzerOptions.kt(+34 -0)📝
pkl-cli/src/main/kotlin/org/pkl/cli/Main.kt(+2 -1)➕
pkl-cli/src/main/kotlin/org/pkl/cli/commands/AnalyzeCommand.kt(+66 -0)➕
pkl-cli/src/test/kotlin/org/pkl/cli/CliImportAnalyzerTest.kt(+142 -0)📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliMainTest.kt(+3 -1)➕
pkl-core/src/main/java/org/pkl/core/Analyzer.java(+120 -0)📝
pkl-core/src/main/java/org/pkl/core/EvaluatorBuilder.java(+4 -0)➕
pkl-core/src/main/java/org/pkl/core/ImportGraph.java(+111 -0)📝
pkl-core/src/main/java/org/pkl/core/ast/builder/ImportsAndReadsParser.java(+44 -17)📝
pkl-core/src/main/java/org/pkl/core/module/ProjectDependenciesManager.java(+4 -0)📝
pkl-core/src/main/java/org/pkl/core/project/ProjectPackager.java(+3 -5)➕
pkl-core/src/main/java/org/pkl/core/runtime/AnalyzeModule.java(+53 -0)📝
pkl-core/src/main/java/org/pkl/core/runtime/ModuleCache.java(+2 -0)...and 33 more files
📄 Description
This adds a new feature to build a dependency graph of Pkl programs, following the SPICE outlined in https://github.com/apple/pkl-evolution/pull/2.
It adds:
pkl analyze importsorg.pkl.core.Analyzerpkl:analyzeanalyzeIn addition, it also deprecates
transitiveModulesfrom pkl-gradle. It instead derives transitive modules by building an import graph of those tasks' source modules.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.