feat(abg)!: allow to wire typed outputs to matching typed inputs
Fixes #73
If types of input and output match, you can do
lookupOnlyExpression = cache.outputs.cacheHit
If types do not match for whatever reason, you can still do
lookupOnlyExpression = cache.outputs.cacheHit_Untyped
or
lookupOnlyExpression = Expression(cache.outputs.cacheHit.expression)
or (but deprecated)
lookupOnly_Untyped = cache.outputs.cacheHit.expressionString
If no type is declared for the output, you can still stuff the _Untyped one into any expression input like
lookupOnlyExpression = cache.outputs.cacheHit_Untyped
Ad-hoc outputs behave like untyped outputs in that you can stuff it into everywhere
lookupOnlyExpression = cache.outputs["cache-hit"]
[!WARNING] This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. Learn more
-
#1624
👈 (View in Graphite)
-
#1647
: 1 other dependent PR (#1644
) -
#1639
-
main
This stack of pull requests is managed by Graphite. Learn more about stacking.
So far it indeed seems to work just great. I played a bit with the current state, merged with my other stack.
Main remaining problem is probably the naming at https://github.com/typesafegithub/github-workflows-kt/pull/1624/files#diff-76c4a08acf57b6c491c34cc60e6ad7bbc219fbd45dc0dda74550941ecac51200 :-/
Of course the typing catalog should be polished to have proper output types which it currently does not have.
That's anyway a bit bad, as the typing catalog is supposed to be independent of consumers, so just using string everywhere just because this lib does not yet read it, ..., well, ... ;-)
Forgot the job outputs, now they are also typed :-)
And now AbstractResult also has a toExpression() function :-)