Closed rcgoodfellow closed 1 month ago
Definitely a huge pain point today. I'm wondering if the approach shown in https://github.com/oxidecomputer/omicron/pull/5653 -- splitting up the API into a trait that sits in its own crate (from which the OpenAPI document can be generated), and the impl in a separate crate -- would improve matters here.
As demoed today -- it absolutely does!
I think we can close this one now @sunshowers?
Since this is focused on the internal API, and all of those have now been converted, this is done, yeah.
Currently when a data structure is changed that is shared among internal APIs, it requires the developer to manually iterate through compiling individual omicron components, generating their API specifications, recompiling dependent internal crates, if the types are re-exported from those dependent crates compiling them, regenerating their API specifications, finding any dependencies for those crates and continuing to iterate, sometimes circularly with a need for stubbing things out with
todo!()
directives to break loops.It seems like there should be something like an xtask for automating this. The xtask would likely not be able to deal with loops, but perhaps that would force us into avoiding loops in the first place.