-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
This API would replace the ad-hoc API in orc.values.sites.SiteMetadata with something a bit more principled and powerful. The new API needs to have the following features:
- Provide the following information about a method:
- How many times it will publish, as a
Range. - Whether it has side-effects.
- Whether it observes the mutable state and hence is effected by other methods effects. Any site that returns false for this is "pure" in that it will always return the same value given the same arguments.
- The maximum delay between the call starting and when it will publish for the first time.
- The maximum delay between the call starting and when it will halt.
- Can it be "direct called".
- Can it be called at compile time.
- For the published values, a full set of metadata information.
- How many times it will publish, as a
- Provide the following information about object which provide field accessors:
- What fields is the object guaranteed to have.
- For each field, a full set of metadata information.
- Can the object have additional fields beyond those which are specified in the metadata.
- Provide the following information about any data value (returned from a method or anything else):
- Is the value mutable or immutable? (for distribution purposes mostly)
All values need to have safe conservative values. For instance, it is safe to assume that a site will have side-effects even if it does not. Sites that do not provide this information will use those values by default.
Many of these values will need to have data types defined from them. Some of those (delay, and effect information) need to be designed pretty carefully and have well defined semantics.
Once this API is implemented it should immediately replace the old version. The SiteMetadata API was never documented or officially made public.