symfonic.cli.component_dependencies¶
component_dependencies ¶
What each scaffold component cannot be generated without.
A component whose templates import another component's package is not
independently selectable: symfonic init --components fastapi,chats wrote
app/chats/router.py, which imports app.auth.deps, into an app/ that
had no auth/ in it. validate_components checked that every name was
known and nothing else, so the CLI accepted the selection, generated the
files, and the adopter met the problem at their first import.
Kept beside :mod:symfonic.cli.components rather than inside it because it
answers a different question -- not "what components exist" but "which of them
depend on which" -- and because the adopter-validation gate reads this
declaration to build its covering set of scaffold variants. A separate module
gives that reader one file to parse instead of a catalog to search.
unsatisfied_dependencies ¶
The failure message for components, or "" when it is satisfiable.
Refuses rather than auto-includes. Adding auth because chats was
asked for generates a project the adopter did not ask for and did not read
about, and leaves the components they got different from the ones they
typed. The message names what to add instead.