Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow updating of generated files #1275

Closed
treiher opened this issue Dec 21, 2022 · 1 comment
Closed

Allow updating of generated files #1275

treiher opened this issue Dec 21, 2022 · 1 comment
Labels
architectural decision Discussion of design decision generator Related to generator package (SPARK code generation)

Comments

@treiher
Copy link
Collaborator

treiher commented Dec 21, 2022

Context and Problem Statement

Two consecutive runs of rflx generate with the same input files lead to an error, as rflx 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

@treiher treiher added generator Related to generator package (SPARK code generation) architectural decision Discussion of design decision labels Dec 21, 2022
@treiher treiher added this to Medium in RecordFlux Future via automation Dec 21, 2022
@treiher treiher moved this from Medium to High in RecordFlux Future Dec 21, 2022
@treiher
Copy link
Collaborator Author

treiher commented May 24, 2023

The behavior is changed in RecordFlux 0.10.0.

@treiher treiher closed this as completed May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architectural decision Discussion of design decision generator Related to generator package (SPARK code generation)
Projects
No open projects
Development

No branches or pull requests

1 participant