Open Mearman opened 8 months ago
Nice!
@seefeldb Do you know a way around this currently?
My minimal board for tests is board((inputs) => inputs)
. That's not quite the same as empty, it creates an input and an output node and a *
wire between them.
But then I think a lot of other stuff would break if boards don't have at least one input and one output node.
@dglazkov : board(() => ({}))
doesn't work either right now, because I treat returning a constant as likely an error. I think (board((_, base) => base.output())
might work and might produce a board with just an output node, but I think we shouldn't allow that case. The true no-op case would be board((_, base) => base.input().as({}).to(base.output())
, i.e. an input and output node pair with an empty wire between them. WDYT?
Hmmm I think I had my OOP hat on too tight and just wanted to effectively construct someone with an empty constructor. though for the tests those examples will certainly point me in the right direction. thank you!
We will look at whether this still applies to the newer Build API.
in updating my tests for https://github.com/breadboard-ai/breadboard/pull/587/#discussion_r1476743274 I discovered this, which is preventing me from creating an empty board.
https://github.com/breadboard-ai/breadboard/blob/b5577943bdd0956bed3874244b34ea80f1589eaa/packages/breadboard/src/new/grammar/board.ts#L87-L88