Skip to content

v2: Break deprecated APIs#642

Merged
dharmab merged 9 commits intov2-devfrom
v2-break-deprecated-apis
Feb 23, 2026
Merged

v2: Break deprecated APIs#642
dharmab merged 9 commits intov2-devfrom
v2-break-deprecated-apis

Conversation

@dharmab
Copy link
Owner

@dharmab dharmab commented Feb 23, 2026

Summary

  • Remove deprecated Speaker.Say(string), rename SayContext to Say(context.Context, string)
  • Remove deprecated brevity.SpikedResponse, rename SpikedResponseV2SpikedResponse
  • Remove deprecated Aircraft.HasAnyTag()
  • Change types.Message.Client from ClientInfo to *ClientInfo with omitempty (pre-existing TODO v2 comment)
  • Fix pre-existing lint issues: typo in group.go, float comparison in trackfile_test.go

Test plan

  • make lint — 0 issues
  • make vet — clean
  • make test — 855 tests pass

🤖 Generated with Claude Code

dharmab and others added 3 commits February 22, 2026 22:13
- Remove deprecated Speaker.Say(string), rename SayContext to Say(context.Context, string)
- Remove deprecated brevity.SpikedResponse, rename SpikedResponseV2 to SpikedResponse
- Remove deprecated Aircraft.HasAnyTag()
- Change types.Message.Client from ClientInfo to *ClientInfo with omitempty (TODO v2)
- Add brevity.Response sealed interface; narrow controller.Call.Call from any to brevity.Response
- Fix pre-existing lint issues: misspelling in group.go, float comparison in trackfile_test.go

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both message types call syncClient, so they can share a case arm,
reducing repeated nil guards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The marker interface added noise across 17 files for minimal benefit.
The existing type switch in composeCall already handles unknown types,
so any typed narrowing was largely cosmetic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dharmab dharmab marked this pull request as ready for review February 23, 2026 05:29
@dharmab dharmab changed the title v2: Break deprecated APIs and narrow types v2: Break deprecated APIs Feb 23, 2026
dharmab and others added 6 commits February 22, 2026 22:36
The go:generate script in pkg/recognizer/parakeet/generate_windows.go
uses `go list -m -json` to find the sherpa-onnx-go-windows module
directory. Without prior `go mod download`, the module cache is empty
and `Dir` is blank, causing `cd "$SHERPA_LIB"` to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Makefile sets GOPATH=/ucrt64 for Windows builds, so the module
cache lives at /ucrt64/pkg/mod. The previous go mod download step used
the default GOPATH, putting modules in a different location. This caused
go list -m -json (run under GOPATH=/ucrt64 by the Makefile) to return
an empty Dir, making the generate script's cd fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When MSYS2's go1.25.5 delegates to go1.26.0 (a Windows-native binary),
go1.26.0 receives GOPATH=/ucrt64 but interprets it as D:\ucrt64 (Windows
path from drive root), not D:\a\_temp\msys64\ucrt64 (the actual MSYS2
prefix). This causes modules to be downloaded to or looked up from the
wrong location.

Setting GOMODCACHE explicitly to the Windows-format path via cygpath
ensures go1.26.0 always uses the correct directory, regardless of how
it interprets the MSYS2 POSIX path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The generate script called go list -m -json to find the sherpa-onnx
module directory, but this triggers Go's toolchain delegation from
MSYS2's go1.25.5 to a Windows-native go1.26.0 binary. The native
binary misinterprets MSYS2 POSIX paths (e.g. /ucrt64 becomes D:\ucrt64
instead of D:\a\_temp\msys64\ucrt64), causing it to return an empty Dir.

Instead, compute SHERPA_DLL_DIR directly in the Makefile by reading
the module version from go.mod with grep+awk (no Go invocation needed)
and constructing the POSIX path from the known GOPATH. Pass the result
as $SHERPA_LIB to the generate script, which simply cd's to it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of a separate "Configure Go module cache" step that writes
GOMODCACHE to GITHUB_ENV, compute the Windows-format path via cygpath
directly in the Makefile's GOBUILDVARS (so go build and go generate
automatically use the correct module cache) and inline it in the
go mod download step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Avoids the ifeq in the generate target and keeps a consistent name
between the Makefile variable and the env var used in the generate script.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dharmab dharmab merged commit 9c6cbe3 into v2-dev Feb 23, 2026
8 checks passed
@dharmab dharmab deleted the v2-break-deprecated-apis branch February 23, 2026 14:30
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.

1 participant