Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Avoid updating target file mtime in 'generate'#3980

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
n-oden wants to merge1 commit intosqlc-dev:main
base:main
Choose a base branch
Loading
fromodenio:preserve-target-mtime

Conversation

n-oden
Copy link

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).

@dosubotdosubotbot added size:SThis PR changes 10-29 lines, ignoring generated files. 🔧 golang labelsJun 3, 2025
If the target file exists on disk already, compare its contentsto the generated source in memory: only update the target fileon disk if the contents differ or if the target file is missing.This should allow build tools downstream of sqlc to make conditionaldecisions based on whether the generated code files have been updated(e.g. mockgen).
@n-odenn-odenforce-pushed thepreserve-target-mtime branch from7874bd9 to916bfbfCompareJune 3, 2025 23:00
@dosubotdosubotbot added size:MThis PR changes 30-99 lines, ignoring generated files. and removed size:SThis PR changes 10-29 lines, ignoring generated files. labelsJun 3, 2025
@n-oden
Copy link
Author

@kyleconroy small nudge here: is this a change that you're okay with?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
size:MThis PR changes 30-99 lines, ignoring generated files.🔧 golang
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@n-oden

[8]ページ先頭

©2009-2025 Movatter.jp