Skip to content

Move benchmark-only deps behind build tag#2

Merged
fanyang89 merged 2 commits intomainfrom
5vapct-codex/remove-unused-libraries-and-simplify-dependencies
Feb 10, 2026
Merged

Move benchmark-only deps behind build tag#2
fanyang89 merged 2 commits intomainfrom
5vapct-codex/remove-unused-libraries-and-simplify-dependencies

Conversation

@fanyang89
Copy link
Collaborator

Motivation

  • Reduce unnecessary runtime build dependencies because leveldb, wal, and lz4 are only used by benchmarks and gookit/color overlaps with pterm utilities.
  • Make normal go test / build faster and avoid pulling heavy benchmark-only modules during normal development.

Description

  • Split VFS raw benchmark code into a new file cmd_vfs_raw_bench_test.go guarded by //go:build benchmark so benchmark-only imports are only required for benchmark builds.
  • Trimmed cmd_vfs_raw_test.go to keep only unit tests and removed benchmark helpers from that file.
  • Replaced direct usage of github.com/gookit/color in pterm_writer.go with pterm.RemoveColorFromString to rely on pterm utilities instead of an extra color dependency.
  • Removed benchmark-only direct requirements (github.com/pierrec/lz4/v4, github.com/syndtr/goleveldb, github.com/tidwall/wal, and github.com/gookit/color) from the main require block and cleaned corresponding entries from go.sum.

Testing

  • Ran gofmt on modified files successfully to normalize formatting and committed the changes.
  • Attempted go mod tidy, which could not complete fetching some modules due to proxy/network restrictions (module fetch errors for benchmark-only modules), so dependency verification for those modules was not completed.
  • No unit/benchmark test runs were executed as part of this change in the current environment.

Codex Task

@fanyang89 fanyang89 merged commit e9ec17e into main Feb 10, 2026
2 checks passed
@fanyang89 fanyang89 deleted the 5vapct-codex/remove-unused-libraries-and-simplify-dependencies branch February 10, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant