-
Notifications
You must be signed in to change notification settings - Fork 9
Description
The provides directive identifies functions in a ruleset that can be used by other rulesets using this one as a module.
The shares directive identifies functions that can be invoked from the world outside the pico, through any of these ways:
- through HTTP using a /sky/cloud URL, for example
http://DOMAIN/sky/cloud/ECI/RID/FUNCTION - through the Testing tab
- through the
wrangler:picoQueryfunction usingctx:queryfor another pico hosted by the same pico engine - through the
wrangler:picoQueryfunction using either an ECI or a DID
The latter, in the case of a DID passed in in lieu of an ECI ultimately uses an ECI from the DIDDoc service endpoints which include the ECI which is actually used to invoke the function. In all cases, the ECI must have a query policy that allows the function to be invoked for the ruleset that defines it.
As written, the dido library allows for a provided function to be invoked, but not a shared one. This seems wrong to me.
For example, in this commit the wrangler:picoQuery function fails with a "null is not a function" error message, when the ruleset shares the function.
OTOH, in this commit, it succeeds, when the ruleset provides the function.
Tagged as a question to get opinions from @windley and @joshmann35 .