Documentation
¶
Overview ¶
test-gomod-compare: Tests whether comparing the generated go.mod with the existing file on disk can be used to skip go mod tidy + vendor.
The optimization strategy:
- Generate the modified go.mod in memory (same as SyncDistSources)
- Read the existing .bldr/src/go.mod from disk
- If bytes.Equal: skip go mod tidy + vendor (saves ~1s)
- If different: write new go.mod, run tidy + vendor as normal
Run from bldr repo root:
go run ./prototypes/sync-optimization/test-gomod-compare.go
Click to show internal directories.
Click to hide internal directories.