Skip to main content

diana_generator 0.15.1 copy "diana_generator: ^0.15.1" to clipboard
diana_generator: ^0.15.1 copied to clipboard

Code generator for the Diana backend framework. Resolves the dependency injection graph at build time and emits the application composition root.

diana_generator #

Code generator for the Diana framework. Add it to dev_dependencies next to build_runner; no build.yaml needed in your application.

Three builders:

  • diana_metadata — per-library summaries of Diana-annotated declarations (cached, invisible).
  • diana_part — per-library .diana.dart part files: route adapters, DTO validators, configuration binders.
  • diana_bootstrap — aggregates the summaries, resolves the DI graph at build time (missing providers, ambiguous bindings, cycles and scope violations are build errors with precise locations), and emits the composition root (DianaContext, buildDianaServer(), runDiana()) next to the @DianaApplication class.

Architecture notes: all analyzer touch-points live in src/readers/, which immediately convert elements to plain-data models (src/model/); graph resolution (src/graph/) and code emission (src/emit/) never see analyzer types. Generated output is deterministic — rebuilding unchanged sources is byte-identical.

0
likes
160
points
122
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Code generator for the Diana backend framework. Resolves the dependency injection graph at build time and emits the application composition root.

Repository (GitHub)
View/report issues

Topics

#codegen #build-runner #dependency-injection

License

MIT (license)

Dependencies

analyzer, build, code_builder, collection, dart_style, diana_annotation, glob, path, source_gen

More

Packages that depend on diana_generator