Allow updating of generated files #1275
Labels
architectural decision
Discussion of design decision
generator
Related to generator package (SPARK code generation)
Context and Problem Statement
Two consecutive runs of
rflx generate
with the same input files lead to an error, asrflx generate
refuses to overwrite existing files to ensure not creating conflicts with existing files (see #993). The need to explicitly clean the target directory can be annoying while working on a specification.Considered Options
O1 Add CLI option
Add a CLI option (e.g.,
--clean
) which, leads to removal of all files in the target directory before generation.+ Simple
− User action necessary
O2 Do not show error if all existing files are overwritten
+ In many cases, no additional user action necessary
− In some cases, e.g., after renaming a message type, manual cleaning of target directory is still necessary
O3 Store metadata to track dependencies of generated files
By tracking the dependencies between generated files, it could be possible to ensure that no partial updates are performed and no files, that are not required anymore, are left over.
+ No user action necessary
− Possibly complex corner cases
Decision Outcome
O2
The text was updated successfully, but these errors were encountered: