cargo-px icon indicating copy to clipboard operation
cargo-px copied to clipboard

Re-compute codegen plan after the execution of each code-generation step

Open LukeMathWalker opened this issue 2 years ago • 1 comments

There are pathological cases (see here) that might require us to re-compute the codegen plan after the execution of each code generation unit.

We could start off with a pretty naive implementation (i.e. cargo generate-lockfile + re-compute the codegen plan - the units we already generated) and then make it more sophisticated over time (e.g. detect if the newly generated manifest has added any new dependency edges and skip re-generation if that's not the case).

LukeMathWalker avatar May 03 '23 08:05 LukeMathWalker

After thinking about this some more, it is not necessary to recompute the codegen plan after each generation.

The following should work:

  • Perform code generation for each leaf in the codegen plan tree (i.e. nodes without outgoing edges)
  • Re-compute plan

until the tree is completely consumed.

LukeMathWalker avatar May 05 '23 08:05 LukeMathWalker