You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nunavut was never designed as a library. It started as a CLI, separate from libcanard, to integrate with makefiles and later cmake. It grew organically from its origin as a quick-and-dirty wrapper around jinja and the internals have gone through torturous evolutions as new languages were added and features requested. With 3.0 nunavut will start acting more like gcc in handling lists of files instead of directories and in managing dependencies between dsdl files. To get there it took on more debt supporting an incompatible "legacy" mode that is no longer aligned with the newer CLI or generate_all helper function.
This issue is a proposal for significant changes to the library's internals with Nunavut 4.0 to make it more usable as a python library as well as a CLI. To do this 4.0 will remove all deprecated paths in the core and will refactor the various generator types to be the primary API instead of the generate_all function, with it's burdening argument list. By moving to a builder pattern for a single generator object (instead of separate support and code generators) the CLI will use the same pattern and code to construct objects as any direct consumer. For example:
If this proposal is agreed upon then the following features will be marked as deprecated in 3.0 and removed in 4.0 in order to simplify Nunavut.
Non-Jinja file processing
All post processing features will be removed where users will be encouraged to use a more unix-like model of pipelining nnvg outputs through other utilities instead of asking nnvg to do it for them. Specifically the following CLI options will be removed:
--trim-blocks
--lstrip-blocks
--pp-max-emptylines
--pp-trim-trailing-whitespace
--pp-run-program
--pp-run-program-arg
To this end, the "listing" options like --list-outputs may be modified slightly to support shell pipelines like nnvg --list-outputs | xargs awk 'awk stuff blarg'
Un-targeted code generation
Un-targeted generation support (i.e. no target language specified) will be removed as this was never used and introduces a lot of additional edge cases that requires conditional checks and tests. While the ln global will remain, all templates will require a target_language to be set and not doing so will be an error checked as a precondition by generators.
The text was updated successfully, but these errors were encountered:
Nunavut was never designed as a library. It started as a CLI, separate from libcanard, to integrate with makefiles and later cmake. It grew organically from its origin as a quick-and-dirty wrapper around jinja and the internals have gone through torturous evolutions as new languages were added and features requested. With 3.0 nunavut will start acting more like gcc in handling lists of files instead of directories and in managing dependencies between dsdl files. To get there it took on more debt supporting an incompatible "legacy" mode that is no longer aligned with the newer CLI or
generate_all
helper function.This issue is a proposal for significant changes to the library's internals with Nunavut 4.0 to make it more usable as a python library as well as a CLI. To do this 4.0 will remove all deprecated paths in the core and will refactor the various generator types to be the primary API instead of the
generate_all
function, with it's burdening argument list. By moving to a builder pattern for a single generator object (instead of separate support and code generators) the CLI will use the same pattern and code to construct objects as any direct consumer. For example:Simplification - De-creeping features
If this proposal is agreed upon then the following features will be marked as deprecated in 3.0 and removed in 4.0 in order to simplify Nunavut.
Non-Jinja file processing
All post processing features will be removed where users will be encouraged to use a more unix-like model of pipelining nnvg outputs through other utilities instead of asking nnvg to do it for them. Specifically the following CLI options will be removed:
To this end, the "listing" options like
--list-outputs
may be modified slightly to support shell pipelines likennvg --list-outputs | xargs awk 'awk stuff blarg'
Un-targeted code generation
Un-targeted generation support (i.e. no target language specified) will be removed as this was never used and introduces a lot of additional edge cases that requires conditional checks and tests. While the
ln
global will remain, all templates will require a target_language to be set and not doing so will be an error checked as a precondition by generators.The text was updated successfully, but these errors were encountered: