Skip to content

chore: rename Go module path to github.com/DFXswiss/bitbox_flutter#19

Merged
TaprootFreak merged 1 commit into
developfrom
chore/rename-go-module
May 16, 2026
Merged

chore: rename Go module path to github.com/DFXswiss/bitbox_flutter#19
TaprootFreak merged 1 commit into
developfrom
chore/rename-go-module

Conversation

@TaprootFreak
Copy link
Copy Markdown

@TaprootFreak TaprootFreak commented May 16, 2026

Summary

go/go.mod was still on github.com/konstantinullrich/bitbox_flutter — the original fork path. Now that the repo lives under DFXswiss, the module path should match. Same alignment we did on bitbox-testkit (commit a573ab0).

Changes

  • go/go.mod: module declaration → github.com/DFXswiss/bitbox_flutter.
  • go/api/api.go: the one internal import that referenced the old path.
  • go/go.sum: go mod tidy ran a long-deferred cleanup (the previous bitbox02-api-go bump never tidied). Removes a fistful of transitive deps no longer in the tree (gnark-crypto, c-kzg, verkle, blst, gopsutil, fastssz, etc.) and pulls in the one new transitive (karalabe/hid, USB transport now reached via the newer bitbox02-api-go).

Why the bindings keep working

The generated Kotlin/Swift bindings reference the Go binding by the last path component (api, e.g. Kotlin's import api.Api), not by the full module path. Renaming …/konstantinullrich/bitbox_flutter…/DFXswiss/bitbox_flutter therefore does not break:

  • Kotlin imports in android/src/main/kotlin/com/cakewallet/bitbox_flutter/*.kt
  • Compiled android/libs/api.aar (Java package stays api)
  • iOS bindings in ios/Api.xcframework/ (ObjC class names stay Api*)

Verified by grep: no Kotlin/Swift/Dart consumer references the full Go module path.

Generated artifacts left alone

Four files in ios/Api.xcframework/**/Api.{h,objc.h} and the android/libs/api-sources.jar still contain the old module path in comments:

// Objective-C API for talking to github.com/konstantinullrich/bitbox_flutter/api Go package.

These are auto-generated by gomobile bind and explicitly marked File is generated by gomobile bind. Do not edit.. Hand-patching the comments would (a) violate that contract and (b) drift back the moment anyone runs gomobile bind again. They will refresh naturally on the next release build (run_build_tool_android.sh / iOS xcframework rebuild). Cosmetic-only — no runtime behavior depends on them.

Local validation

Check Result
go vet ./... pass
go test -race -timeout 60s ./... both packages pass
grep -rn konstantinullrich go/ no matches
grep -rn konstantinullrich android/src ios/Classes lib test example no matches in hand-written code

Stacking

Independent of #18 (CI improvements). After #18 lands, this PR's CI will pick up the new Go test job automatically.

The Go module under /go/ was still on the old fork path
github.com/konstantinullrich/bitbox_flutter. Now that the repo lives
under DFXswiss, the module path should match — same alignment we did
on bitbox-testkit.

Single import in go/api/api.go updated alongside the module statement.
`go mod tidy` cleaned out indirect deps that were never reached from
this module (gnark-crypto, c-kzg, verkle, blst, etc.).

Verified: `go vet ./...` clean, `go test -race -timeout 60s ./...`
passes both api and u2fhid packages.
@TaprootFreak TaprootFreak marked this pull request as ready for review May 16, 2026 20:27
@TaprootFreak TaprootFreak merged commit 0c96471 into develop May 16, 2026
1 check passed
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