mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
Ensure local dependency matches PklProject.dep.json version (#1594)
The version of local project dependencies should _always_ exactly match up with what's declared in a PklProject.deps.json; any package in the transitive dependency tree should always be delcaring the same import too. Closes #1591
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
amends "pkl:Project"
|
||||
|
||||
dependencies {
|
||||
// version declared in PklProject.deps.json does not line up with what this local dependency
|
||||
// tells us its version is
|
||||
["project6"] = import("../project6/PklProject")
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:0/project6@1": {
|
||||
"type": "local",
|
||||
"uri": "projectpackage://localhost:0/project6@1.5.0",
|
||||
"path": "../project6/"
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
import "@project6/children.pkl"
|
||||
|
||||
res = children
|
||||
+2
-2
@@ -20,9 +20,9 @@
|
||||
"uri": "projectpackage://localhost:0/project2@1.0.0",
|
||||
"path": "../project2/"
|
||||
},
|
||||
"package://localhost:12110/project6@1": {
|
||||
"package://localhost:0/project6@1": {
|
||||
"type": "local",
|
||||
"uri": "projectpackage://localhost:12110/project6@1.0.0",
|
||||
"uri": "projectpackage://localhost:0/project6@1.0.0",
|
||||
"path": "../project6/"
|
||||
},
|
||||
"package://localhost:0/badImportsWithinPackage@1": {
|
||||
|
||||
+2
-2
@@ -20,9 +20,9 @@
|
||||
"uri": "projectpackage://localhost:0/project2@1.0.0",
|
||||
"path": "../project2/"
|
||||
},
|
||||
"package://localhost:12110/project6@1": {
|
||||
"package://localhost:0/project6@1": {
|
||||
"type": "local",
|
||||
"uri": "projectpackage://localhost:12110/project6@1.0.0",
|
||||
"uri": "projectpackage://localhost:0/project6@1.0.0",
|
||||
"path": "../project6/"
|
||||
},
|
||||
"package://localhost:0/badImportsWithinPackage@1": {
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ amends "pkl:Project"
|
||||
|
||||
package {
|
||||
name = "project6"
|
||||
baseUri = "package://localhost:12110/project6"
|
||||
baseUri = "package://localhost:0/project6"
|
||||
version = "1.0.0"
|
||||
packageZipUrl = "https://localhost:12110/project6/project6-\(version).zip"
|
||||
packageZipUrl = "https://localhost:0/project6/project6-\(version).zip"
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
–– Pkl Error ––
|
||||
Project `file:///$snippetsDir/input/projects/badProjectDeps7/PklProject` declares a dependency on a local package whose version doesn't match what is declared in `PklProject.deps.json`.
|
||||
|
||||
Declared: `package://localhost:0/project6@1.0.0`
|
||||
Resolved: `package://localhost:0/project6@1.5.0`
|
||||
|
||||
Run `pkl project resolve` to update resolved dependencies.
|
||||
|
||||
x | import "@project6/children.pkl"
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
at bug (file:///$snippetsDir/input/projects/badProjectDeps7/bug.pkl)
|
||||
Reference in New Issue
Block a user