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
Prevent the overwriting of files during code generation if they have not changed. This is crucial for CI tooling relying on file modification dates for tasks like cache busting and triggering code generation using tools like Sourcery.
Describe the solution you'd like
Introduce a configuration option to control overwriting unchanged files, or by default, prevent such overwriting.
The text was updated successfully, but these errors were encountered:
Hi @reejosamuel, thanks for the feature suggestion.
I think to make this work we'd have to introduce a checksum of the file body that is written into generated files as a header comment. Currently the overwrite logic is very simplistic and comes down to whether the generated file is one that we allow user edits, such as the schema configuration and custom scalars. If yes then leave the file alone, if no then overwrite it. There is no tracking of generated file diffs at the moment.
Use case
Prevent the overwriting of files during code generation if they have not changed. This is crucial for CI tooling relying on file modification dates for tasks like cache busting and triggering code generation using tools like Sourcery.
Describe the solution you'd like
Introduce a configuration option to control overwriting unchanged files, or by default, prevent such overwriting.
The text was updated successfully, but these errors were encountered: