diff --git a/docs/modules/release-notes/pages/0.31.adoc b/docs/modules/release-notes/pages/0.31.adoc index 806e8cc7..d5990983 100644 --- a/docs/modules/release-notes/pages/0.31.adoc +++ b/docs/modules/release-notes/pages/0.31.adoc @@ -196,7 +196,7 @@ image::syntax-highlight-error.png[syntax highlighted output] [[cli-dependency-notation]] === CLI Support for Dependency Notation -The Pkl CLI now supports specifying modules using xref:language-reference:index.adoc#project-dependencies[dependency notation] (pr:https://github.com/apple/pkl/pull/1434[]). +The Pkl CLI now supports specifying modules using xref:language-reference:index.adoc#project-dependencies[dependency notation] (pr:https://github.com/apple/pkl/pull/1434[], pr:https://github.com/apple/pkl/pull/1439[]). This is especially helpful for <> defined in Packages: [source,bash] diff --git a/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliCommand.kt b/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliCommand.kt index 856d2231..fb0a4f69 100644 --- a/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliCommand.kt +++ b/pkl-commons-cli/src/main/kotlin/org/pkl/commons/cli/CliCommand.kt @@ -111,9 +111,10 @@ abstract class CliCommand(protected val cliOptions: CliBaseOptions) { remoteDep.packageUri.toPackageAssetUri(path).uri } - protected val resolvedSourceModules: List = + protected val resolvedSourceModules: List by lazy { if (project == null) cliOptions.normalizedSourceModules else cliOptions.normalizedSourceModules.map(::resolveModuleUri) + } protected fun loadProject(projectFile: Path): Project { val securityManager =