Skip to content

Commit 5ac98da

Browse files
bomly-guyclaude
andcommitted
build: require Go 1.27
Bumps the go directive to 1.27.0 (plan step 0.2, CLI slice; ADR-0039) and absorbs the one-time go mod tidy require-block consolidation. Every workflow reads the toolchain via go-version-file, so no CI edits. CONTRIBUTING gains the Go prerequisite (GOTOOLCHAIN=auto downloads it automatically); .gitignore gains go.work/go.work.sum so the local cross-repo workspace never lands in a commit — main must stay replace-free for remote go install. The bump exposed one latent test defect: Go 1.27 test binaries carry dependency build info, so TestRootVersion_IncludesTrackedDependencyVersions ran its assertion loop for the first time in years and failed — the rendered format gained the module path long ago while the test still expected 'Syft:'. The test now asserts the exact rendered line and fails loudly when dependency resolution comes back empty, so it can never pass vacuously again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 183a29f commit 5ac98da

4 files changed

Lines changed: 31 additions & 16 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ qodana.yaml
4040
# accidental root-level build outputs
4141
/bomly
4242
/bomly-lite
43+
44+
# local cross-repo workspace (go work init . ../bomly-sdk); never committed —
45+
# main must stay replace-free so remote go install keeps working
46+
go.work
47+
go.work.sum

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public issue tracker.
3232

3333
## Development
3434

35+
Building requires Go 1.27 or newer. On Go 1.21+ with the default
36+
`GOTOOLCHAIN=auto`, the right toolchain downloads automatically from the
37+
`go.mod` directive; with `GOTOOLCHAIN=local` or an older Go, install Go 1.27
38+
first.
39+
3540
```sh
3641
make build # bin/bomly and bin/bomly-lite
3742
make test # unit tests (includes the plugin fixture compile check)

go.mod

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/bomly-dev/bomly-cli
22

3-
go 1.26.3
3+
go 1.27.0
44

55
require (
66
github.com/BurntSushi/toml v1.6.0
@@ -16,6 +16,7 @@ require (
1616
github.com/bomly-dev/bomly-plugin-pyreach-analyzer v0.1.0
1717
github.com/bomly-dev/bomly-plugin-scorecard-matcher v0.1.0
1818
github.com/bomly-dev/bomly-plugin-syft-detector v0.1.0
19+
github.com/bomly-dev/bomly-sdk v0.4.2
1920
github.com/charmbracelet/bubbles v1.0.0
2021
github.com/charmbracelet/bubbletea v1.3.10
2122
github.com/charmbracelet/lipgloss v1.1.0
@@ -32,18 +33,6 @@ require (
3233
gopkg.in/yaml.v3 v3.0.1
3334
)
3435

35-
require (
36-
github.com/anchore/clio v0.1.1 // indirect
37-
github.com/anchore/grype v0.117.0 // indirect
38-
github.com/anchore/syft v1.51.0 // indirect
39-
github.com/evanw/esbuild v0.28.1 // indirect
40-
github.com/glebarez/sqlite v1.11.0 // indirect
41-
github.com/pandatix/go-cvss v0.6.2 // indirect
42-
golang.org/x/net v0.58.0 // indirect
43-
golang.org/x/vuln v1.6.0 // indirect
44-
google.golang.org/protobuf v1.36.12 // indirect
45-
)
46-
4736
require (
4837
cel.dev/expr v0.25.2 // indirect
4938
cloud.google.com/go v0.123.0 // indirect
@@ -70,6 +59,7 @@ require (
7059
github.com/acobaugh/osrelease v0.1.0 // indirect
7160
github.com/adrg/xdg v0.5.3 // indirect
7261
github.com/agext/levenshtein v1.2.3 // indirect
62+
github.com/anchore/clio v0.1.1 // indirect
7363
github.com/anchore/fangs v0.1.1 // indirect
7464
github.com/anchore/go-collections v0.1.1 // indirect
7565
github.com/anchore/go-homedir v0.1.1 // indirect
@@ -80,7 +70,9 @@ require (
8070
github.com/anchore/go-struct-converter v0.2.0-rc2 // indirect
8171
github.com/anchore/go-sync v0.1.1 // indirect
8272
github.com/anchore/go-version v1.2.2-0.20210903204242-51efa5b487c4 // indirect
73+
github.com/anchore/grype v0.117.0 // indirect
8374
github.com/anchore/stereoscope v0.3.0 // indirect
75+
github.com/anchore/syft v1.51.0 // indirect
8476
github.com/andybalholm/brotli v1.2.0 // indirect
8577
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
8678
github.com/aquasecurity/go-pep440-version v0.0.1 // indirect
@@ -114,7 +106,6 @@ require (
114106
github.com/bodgit/plumbing v1.3.0 // indirect
115107
github.com/bodgit/sevenzip v1.6.1 // indirect
116108
github.com/bodgit/windows v1.0.1 // indirect
117-
github.com/bomly-dev/bomly-sdk v0.4.2
118109
github.com/cespare/xxhash/v2 v2.3.0 // indirect
119110
github.com/charmbracelet/colorprofile v0.4.3 // indirect
120111
github.com/charmbracelet/harmonica v0.2.0 // indirect
@@ -152,13 +143,15 @@ require (
152143
github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect
153144
github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect
154145
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
146+
github.com/evanw/esbuild v0.28.1 // indirect
155147
github.com/facebookincubator/nvdtools v0.1.5 // indirect
156148
github.com/fatih/color v1.18.0 // indirect
157149
github.com/felixge/fgprof v0.9.5 // indirect
158150
github.com/felixge/httpsnoop v1.0.4 // indirect
159151
github.com/fsnotify/fsnotify v1.9.0 // indirect
160152
github.com/gabriel-vasile/mimetype v1.4.15 // indirect
161153
github.com/glebarez/go-sqlite v1.22.0 // indirect
154+
github.com/glebarez/sqlite v1.11.0 // indirect
162155
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
163156
github.com/go-git/go-billy/v5 v5.9.1 // indirect
164157
github.com/go-git/go-git/v5 v5.19.2 // indirect
@@ -252,6 +245,7 @@ require (
252245
github.com/opencontainers/runtime-spec v1.3.0 // indirect
253246
github.com/openvex/go-vex v0.2.8 // indirect
254247
github.com/package-url/packageurl-go v0.1.5 // indirect
248+
github.com/pandatix/go-cvss v0.6.2 // indirect
255249
github.com/pborman/indent v1.2.1 // indirect
256250
github.com/pelletier/go-toml v1.9.5 // indirect
257251
github.com/pelletier/go-toml/v2 v2.4.3 // indirect
@@ -315,19 +309,22 @@ require (
315309
golang.org/x/crypto v0.55.0 // indirect
316310
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect
317311
golang.org/x/mod v0.40.0 // indirect
312+
golang.org/x/net v0.58.0 // indirect
318313
golang.org/x/oauth2 v0.36.0 // indirect
319314
golang.org/x/sync v0.22.0 // indirect
320315
golang.org/x/sys v0.47.0 // indirect
321316
golang.org/x/telemetry v0.0.0-20260811182544-a038080d80e5 // indirect
322317
golang.org/x/text v0.41.0 // indirect
323318
golang.org/x/time v0.15.0 // indirect
324319
golang.org/x/tools v0.49.0 // indirect
320+
golang.org/x/vuln v1.6.0 // indirect
325321
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
326322
gonum.org/v1/gonum v0.17.0 // indirect
327323
google.golang.org/api v0.271.0 // indirect
328324
google.golang.org/genproto v0.0.0-20260128011058-8636f8732409 // indirect
329325
google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa // indirect
330326
google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa // indirect
327+
google.golang.org/protobuf v1.36.12 // indirect
331328
gopkg.in/warnings.v0 v0.1.2 // indirect
332329
gorm.io/gorm v1.31.2 // indirect
333330
howett.net/plist v1.0.1 // indirect

internal/cli/version_cmd_test.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,16 @@ func TestRootVersion_IncludesTrackedDependencyVersions(t *testing.T) {
136136
if !strings.Contains(versionText, "bomly 0.9.0-test") {
137137
t.Fatalf("expected version output to contain core version, got:\n%s", versionText)
138138
}
139-
for _, item := range selectedDependencyVersions() {
140-
want := item.Label + ":"
139+
// Test binaries carry dependency build info on the required toolchain,
140+
// so an empty resolution means the assertion loop below would be
141+
// vacuous — which is exactly how the old "Label:" expectation survived
142+
// years after the rendered format gained the module path.
143+
resolved := selectedDependencyVersions()
144+
if len(resolved) == 0 {
145+
t.Fatal("selectedDependencyVersions() resolved nothing; the assertions below would be vacuous")
146+
}
147+
for _, item := range resolved {
148+
want := item.Label + " (" + item.Module + "): " + item.Version
141149
if !strings.Contains(versionText, want) {
142150
t.Fatalf("expected version output to contain %q, got:\n%s", want, versionText)
143151
}

0 commit comments

Comments
 (0)