Support explicitly reference-selected read-only interface dependencies
This commit is contained in:
@@ -183,10 +183,23 @@ function methods(
|
||||
`Selected operation is not an object call available in portable target ${target}; select a portable subset or move this handler to remote execution`,
|
||||
);
|
||||
if (execution.kind === "transaction" && !remote) writable();
|
||||
if (req.receiver === "input" && (remote || execution.kind !== "snapshot"))
|
||||
throw new PortableBindingError(path, "Reference-selected dependencies require portable snapshot calls");
|
||||
return method(
|
||||
`${member.displayName}.${op.displayName}`,
|
||||
{ kind: "interface", operationId: op.id },
|
||||
op.inputType,
|
||||
req.receiver === "input"
|
||||
? {
|
||||
kind: "record",
|
||||
fields: {
|
||||
receiver: {
|
||||
kind: "object-ref",
|
||||
expectation: { kind: "interface", interfaceRevisionId: req.interfaceRevisionId },
|
||||
},
|
||||
input: op.inputType,
|
||||
},
|
||||
}
|
||||
: op.inputType,
|
||||
op.outputType,
|
||||
execution.kind === "transaction",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user