sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Avoid updating target file mtime in 'generate'

Open n-oden opened this issue 4 months ago • 0 comments

If the target file exists on disk already, compare its contents to the generated source in memory: only update the target file on disk if the contents differ or if the target file is missing.

This should allow build tools downstream of sqlc to make conditional decisions based on whether the generated code files have been updated (e.g. mockgen).

n-oden avatar Jun 03 '25 22:06 n-oden