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.

@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/binding-version-v2 branch from 36a0a91 to 8895541 Compare September 29, 2024 17:29
@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/binding-version-v2 branch from 8895541 to 4281b5d Compare September 29, 2024 21:12
@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/binding-version-v2 branch from 4281b5d to 1f9acc7 Compare October 27, 2024 03:52
@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/binding-version-v2 branch from 1f9acc7 to 3bf0f10 Compare October 27, 2024 04:07
@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/binding-version-v2 branch from 3bf0f10 to 7a302ad Compare October 27, 2024 20:37
@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/binding-version-v2 branch from 7a302ad to c660603 Compare October 27, 2024 21:27
@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/binding-version-v2 branch from c660603 to 79fa813 Compare October 28, 2024 10:51
@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/binding-version-v2 branch from 79fa813 to d2f3975 Compare October 28, 2024 14:07
@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/binding-version-v2 branch from d2f3975 to d20434c Compare October 30, 2024 09:39
@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/binding-version-v2 branch from d20434c to d42909a Compare October 30, 2024 11:03
@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/binding-version-v2 branch from d42909a to 9d293a1 Compare October 30, 2024 14:13
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from 71c6dd8 to af313d2 Compare October 30, 2024 14:13
@Vampire Vampire force-pushed the vampire/binding-version-v2 branch from 9d293a1 to 30dd897 Compare December 8, 2024 23:08
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from af313d2 to ed8762b Compare December 8, 2024 23:08
@Vampire Vampire force-pushed the vampire/binding-version-v2 branch from 30dd897 to 9d65dc9 Compare December 9, 2024 11:56
@Vampire Vampire force-pushed the vampire/type-safe-inputs-and-outputs-wiring branch from ed8762b to 06a5920 Compare December 9, 2024 11:56
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