- Notifications
You must be signed in to change notification settings - Fork900
Commit7874bd9
committed
Avoid updating target file mtime in 'generate'
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).1 parenta60f370 commit7874bd9
1 file changed
+19
-1
lines changedLines changed: 19 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
208 |
| - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
209 | 219 |
| |
210 | 220 |
| |
211 | 221 |
| |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
212 | 230 |
| |
213 | 231 |
| |
214 | 232 |
| |
|
0 commit comments
Comments
(0)