OpenCyphal / nunavut

Generate code from DSDL using PyDSDL and Jinja2
https://nunavut.readthedocs.io/
Other
39 stars 24 forks source link

Feature request/discussion: --omit-deprecated #300

Open pavel-kirienko opened 1 year ago

pavel-kirienko commented 1 year ago

Sometimes, when performing maintenance on a DSDL-dependent codebase, you want to exclude (perhaps temporarily) all deprecated data types from the build (which may or not may not fail as a result of this). To support this use case, we could add a new option to Nunavut that makes it ignore all @deprecated types. This is mostly useful with languages that have no built-in support for deprecation, like C.

@thirtytwobits what do you think?

thirtytwobits commented 1 year ago

I'm wondering if the behaviour should be the inverse: deprecated types are only emitted if --include-deprecated is specified.

pavel-kirienko commented 1 year ago

I think this would only create undue obstacles for languages that already have the concept of deprecation.