Skip to content

internal: add comby bindings

Administrator requested to merge rvt/comby-bindings-pipe into master

Created by: rvantonder

The core addition here is the function PipeTo, which takes a comby.types.Args and writer, runs comby with Args, and pipes stdout into the writer. This is the last component toward getting the initial end-to-end structural search code path.

Notes:

  • I am keeping the API minimal for now. Both replacer and searcher only need to be able to write results onto an http writer. The raw results will be unmarshaled in the frontend (like we currently do for replacer). I will add the "result type" definitions in a subsequent diff.

  • These bindings will substitute for all call outs to comby (including current replacer code). Is internal/comby the correct place to put this package?

  • The test duplicates a newStore helper function which exists in searcher and replacer. I will deduplicate these in a separate clean-up diff and plan to put shared functions in internal/testutil.

  • More testing to come when I use these in the context of searcher and replacer--PipeTo is not yet called by any reachable code.

Merge request reports

Loading