sync-optimization

command
v0.50.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

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:

  1. Generate the modified go.mod in memory (same as SyncDistSources)
  2. Read the existing .bldr/src/go.mod from disk
  3. If bytes.Equal: skip go mod tidy + vendor (saves ~1s)
  4. 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL