Build composable Camino packages with explicit type and source dependencies
This commit is contained in:
@@ -198,3 +198,24 @@ package Owner id "package:owner" revision "package:owner@1" {
|
||||
}
|
||||
|
||||
await import("./emit-controllers.js");
|
||||
|
||||
// Standalone public builder roots must work without opting into the other modes.
|
||||
for (const kind of ["portable", "service"]) {
|
||||
const pkg = compileCapabilityResourceSource(
|
||||
`package Owner id "package:owner" revision "package:owner@1" {
|
||||
function identity id "identity" : int32 -> record {pid:int32;child:int32;}
|
||||
execution ${kind === "portable" ? "snapshot targets [browser,server]" : "remote"};
|
||||
}`,
|
||||
{ source },
|
||||
);
|
||||
assert.ok(pkg.ok && pkg.resource.kind === "package", JSON.stringify(pkg.diagnostics));
|
||||
const workspace = compileCapabilitySource(
|
||||
`workspace Simple id "workspace:simple" revision "workspace:simple@1" commit "${source.commit}" {import package Owner;}`,
|
||||
"workspace.qx",
|
||||
{ packages: new Map([["Owner", pkg.resource.revision]]) },
|
||||
);
|
||||
assert.ok(workspace.ok, JSON.stringify(workspace.diagnostics));
|
||||
const directory = `dist/managed/standalone-${kind}`;
|
||||
await mkdir(directory, { recursive: true });
|
||||
await writeFile(`${directory}/execution-plan.json`, JSON.stringify(compileExecutionPlan(workspace.workspace)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user