Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(abg)!: allow to wire typed outputs to matching typed inputs #1624

Open
wants to merge 1 commit into
base: vampire/binding-version-v2
Choose a base branch
from

Conversation

Vampire
Copy link
Collaborator

@Vampire Vampire commented Aug 23, 2024

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"]

Copy link
Collaborator Author

Vampire commented Aug 23, 2024

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

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Vampire and the rest of your teammates on Graphite Graphite

@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch 3 times, most recently from ff26830 to 46ca5ad Compare August 23, 2024 20:34
@Vampire
Copy link
Collaborator Author

Vampire commented Aug 23, 2024

So far it indeed seems to work just great.
I played a bit with the current state, merged with my other stack.

@Vampire
Copy link
Collaborator Author

Vampire commented Aug 23, 2024

@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 46ca5ad to 14d4f80 Compare August 23, 2024 20:44
@Vampire
Copy link
Collaborator Author

Vampire commented Aug 23, 2024

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, ... ;-)

@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 14d4f80 to f4b6351 Compare August 23, 2024 21:13
@Vampire Vampire marked this pull request as ready for review August 23, 2024 21:23
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch 2 times, most recently from 3a53468 to f0429b9 Compare August 25, 2024 02:19
Copy link
Collaborator Author

Vampire commented Aug 25, 2024

Forgot the job outputs, now they are also typed :-)

@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch 9 times, most recently from adbea5b to 59626c0 Compare August 31, 2024 18:28
Copy link
Collaborator Author

Vampire commented Aug 31, 2024

And now AbstractResult also has a toExpression() function :-)

@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch 4 times, most recently from 90360a0 to 09d160e Compare September 5, 2024 18:48
@Vampire Vampire changed the title feat(abg)!: Allow to wire typed outputs to matching typed inputs feat(abg)!: allow to wire typed outputs to matching typed inputs Sep 5, 2024
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch 2 times, most recently from d7c1b5d to f3b7790 Compare September 6, 2024 18:43
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 53b37c4 to 2f45cef Compare September 10, 2024 16:43
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 2f45cef to 79adbb5 Compare September 23, 2024 08:13
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 79adbb5 to 77fb160 Compare September 24, 2024 00:41
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 77fb160 to 2d2821d Compare September 29, 2024 17:29
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 2d2821d to 69d1007 Compare September 29, 2024 21:13
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 69d1007 to f24be3b Compare October 27, 2024 03:52
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from f24be3b to b7312ed Compare October 27, 2024 04:07
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from b7312ed to 82626b6 Compare October 27, 2024 20:37
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 82626b6 to 5cf2155 Compare October 27, 2024 21:28
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 5cf2155 to 4b5d840 Compare October 28, 2024 10:52
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch 2 times, most recently from 7cf7158 to e3fb0e7 Compare October 28, 2024 21:16
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from e3fb0e7 to 2167254 Compare October 30, 2024 09:39
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 2167254 to 71c6dd8 Compare October 30, 2024 11:03
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 71c6dd8 to af313d2 Compare October 30, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core feature request] Allow passing non-string outputs to inputs
1 participant