Skip to content

Drop pre-1.24 Go build-tag split, now that go.mod requires 1.25+ - #88

Open
fatmcgav wants to merge 1 commit into
exaring:mainfrom
fatmcgav:drop-legacy-go-build-tag
Open

fatmcgav wants to merge 1 commit into
exaring:mainfrom
fatmcgav:drop-legacy-go-build-tag

Conversation

@fatmcgav

Copy link
Copy Markdown

go.mod already requires go 1.25.0 and CI only tests 1.25/1.26, so operation_name_legacy.go's !go1.24 build tag was already dead code — it can never be compiled by this module. Its go1.24+ counterpart's go1.24 tag was likewise always true.

  • Removed operation_name_legacy.go (the unicode.IsSpace-based first-word parser for pre-1.24 Go).
  • Renamed operation_name_go124.go to operation_name.go, dropping its now-unconditional go1.24 build tag. defaultSpanNameCtxFunc keeps its strings.FieldsSeq-based implementation, unconditionally.
  • Same reasoning applied to tracer_benchmark_test.go's go1.24 tag (gating testing.B.Loop, also go1.24+) — dropped it too.

No behavioural change; go build, go vet, gofmt -l, and go test -race ./... all pass.

`go.mod` already requires `go 1.25.0` and CI only tests 1.25/1.26, so
`operation_name_legacy.go`'s `!go1.24` build tag was already dead code —
it can never be compiled by this module. Its go1.24+ counterpart's
`go1.24` tag was likewise always true.

- Removed `operation_name_legacy.go` (the `unicode.IsSpace`-based
  first-word parser for pre-1.24 Go).
- Renamed `operation_name_go124.go` to `operation_name.go`, dropping its
  now-unconditional `go1.24` build tag. `defaultSpanNameCtxFunc` keeps
  its `strings.FieldsSeq`-based implementation, unconditionally.
- Same reasoning applied to `tracer_benchmark_test.go`'s `go1.24` tag
  (gating `testing.B.Loop`, also go1.24+) — dropped it too.

No behavioural change; `go build`, `go vet`, `gofmt -l`, and
`go test -race ./...` all pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@costela

costela commented Sep 15, 2026

Copy link
Copy Markdown
Member

LGTM; WDYT @obitech ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants