Repository navigation
feat: several named graph inputs - #16
Merged
Merged
Conversation
A graph can read named inputs, `in.<key>`, with the new GraphInputs as its input type, mirroring GraphOutputs. push(key, value) runs the graph fed through one input; filter(GraphInputs) feeds several in one run. Inputs not fed in a run are empty, like dropped paths, so merges and outputs need no new rules. GraphInputs::of<Types...>(keys...) declares the input types, checked when the graph is built; an undeclared input takes the type of its first reader. Unknown keys and mistyped values throw when fed. A `.<key>` on anything but in/out is now a diagnostic instead of being ignored. Implements TODO item 2 (now item 1 after the previous removal).
psyinf
force-pushed
the
feature/named-graph-inputs
branch
from
September 19, 2026 19:42
be213b8 to
ff42094
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements TODO item "Several named graph inputs". Stacked on #15 — merge that first; this PR then retargets to
main.What
A graph can read named inputs, mirroring
GraphOutputs:Semantics
push/filteris one run. Inputs not fed are empty, exactly like dropped paths: readers are skipped, merges see holes. No new rules for merges or outputs.GraphInputs::of<Types...>(keys...)declares input types, checked at construction like any edge. Declared-but-unread and read-but-undeclared inputs are diagnostics.the graph input 'in.orders' (typed by its reader 'ParseOrder')).std::out_of_range; a mistyped value throwsstd::invalid_argument.inwithGraphInputs, orin.<key>with a plain input type, is a diagnostic.DslFilterGraph<In, Out>with a plain type is unchanged.Also
.<key>on anything other thanin/out(e.g.msg.x) is now a diagnostic; it used to be silently ignored.dsl::GraphProgram::inputslists the inputs a program reads;validateDslGraph(text, inputTypes)overload.EdgeTypeshelper, andGraphPlan::runtakes one value per input.Docs / tests
README ("Several named inputs"), EXAMPLE.md section 5 +
textPipelinedemo 4b, CHANGELOG, TODO (item removed, rest renumbered). NewGraphInputsTests.cpp(11 cases, incl. nesting a named-input graph as a stage) plus parser-agreement cases. All 107 tests pass (MSVC debug, ASan).