From 602593b47da04265b90764bdecc3f43d116752ca Mon Sep 17 00:00:00 2001 From: matt wilkie Date: Wed, 27 May 2026 21:48:24 -0700 Subject: [PATCH] fix(install): use declared module path for go fallback (#4215) The repository has moved to gastownhall/beads, but released Go modules still declare github.com/steveyegge/beads. The installer fallback should use the declared module path, and the docs/check should keep future guidance from regressing. _codex-gpt-5.5-medium on behalf of matt wilkie_ --- docs/INSTALLING.md | 2 ++ scripts/check-go-install-guidance.sh | 12 ++++++++++++ scripts/install.sh | 8 +++++--- website/docs/getting-started/installation.md | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/INSTALLING.md b/docs/INSTALLING.md index 84b9fc01e..f0a0e038d 100644 --- a/docs/INSTALLING.md +++ b/docs/INSTALLING.md @@ -105,6 +105,8 @@ BEADS_INSTALL_RESIGN_MACOS=1 curl -fsSL https://raw.githubusercontent.com/gastow - **Nocgo (simplest, default in this doc):** `CGO_ENABLED=0 go install ...`. Works on any machine with a Go toolchain, no C compiler needed. Produces a **server-mode-only** binary — you must run an external `dolt sql-server` and use `bd init --server`. See [DOLT.md](DOLT.md) for server-mode setup. - **Cgo (embedded-capable):** `CGO_ENABLED=1 GOFLAGS=-tags=gms_pure_go go install ...`. Requires a C compiler (gcc/clang on Unix, MinGW on Windows). Produces a binary with the default embedded-Dolt backend — `bd init` Just Works. +Use the `github.com/steveyegge/beads` path for `go install`. The repository now lives under `gastownhall/beads`, but released Go modules still declare `github.com/steveyegge/beads` for compatibility. + If you don't have a preference, `brew install beads` / `install.sh` give you the embedded-capable build with no fuss. ## Platform-Specific Installation diff --git a/scripts/check-go-install-guidance.sh b/scripts/check-go-install-guidance.sh index bb3656ee2..386ae927a 100755 --- a/scripts/check-go-install-guidance.sh +++ b/scripts/check-go-install-guidance.sh @@ -11,6 +11,18 @@ set -euo pipefail fail=0 +while IFS= read -r hit; do + file="${hit%%:*}" + rest="${hit#*:}" + line_no="${rest%%:*}" + + printf 'error: %s:%s: unsupported go install module path\n' "$file" "$line_no" >&2 + printf ' use github.com/steveyegge/beads/cmd/bd because go.mod still declares that module path\n' >&2 + fail=1 +done < <( + git grep -n -E 'go install github\.com/gastownhall/beads/cmd/bd@latest' -- . || true +) + while IFS= read -r hit; do file="${hit%%:*}" rest="${hit#*:}" diff --git a/scripts/install.sh b/scripts/install.sh index 67ccf24f3..d6b0a6628 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -482,7 +482,9 @@ install_with_go() { bin_dir="$(go env GOPATH)/bin" fi - if CGO_ENABLED=1 GOFLAGS="${GOFLAGS:+$GOFLAGS }-tags=gms_pure_go" go install github.com/gastownhall/beads/cmd/bd@latest; then + # The repository lives under gastownhall, but the Go module path remains + # github.com/steveyegge/beads for compatibility with released tags. + if CGO_ENABLED=1 GOFLAGS="${GOFLAGS:+$GOFLAGS }-tags=gms_pure_go" go install github.com/steveyegge/beads/cmd/bd@latest; then log_success "bd installed via go install (embedded-capable)" LAST_INSTALL_PATH="$bin_dir/bd" @@ -491,7 +493,7 @@ install_with_go() { fi else log_warning "go install with CGO failed; retrying without CGO (server-mode-only binary)" - if CGO_ENABLED=0 go install github.com/gastownhall/beads/cmd/bd@latest; then + if CGO_ENABLED=0 go install github.com/steveyegge/beads/cmd/bd@latest; then log_success "bd installed via go install (CGO_ENABLED=0, server mode only)" log_warning "This bd cannot use embedded Dolt. Run 'bd init --server' to use an external dolt sql-server, or reinstall with a C toolchain for embedded mode." LAST_INSTALL_PATH="$bin_dir/bd" @@ -751,7 +753,7 @@ main() { echo "" echo "Or install from source:" echo " 1. Install Go from https://go.dev/dl/" - echo " 2. Run: CGO_ENABLED=1 GOFLAGS=-tags=gms_pure_go go install github.com/gastownhall/beads/cmd/bd@latest" + echo " 2. Run: CGO_ENABLED=1 GOFLAGS=-tags=gms_pure_go go install github.com/steveyegge/beads/cmd/bd@latest" echo "" exit 1 } diff --git a/website/docs/getting-started/installation.md b/website/docs/getting-started/installation.md index 78caad169..9a2827c22 100644 --- a/website/docs/getting-started/installation.md +++ b/website/docs/getting-started/installation.md @@ -45,6 +45,8 @@ Use Homebrew, npm, or the install script if you do not specifically need `go ins ICU headers are not required. The embedded-capable command uses `gms_pure_go` so go-mysql-server uses Go's stdlib regexp instead of ICU. +Use the `github.com/steveyegge/beads` path for `go install`. The repository now lives under `gastownhall/beads`, but released Go modules still declare `github.com/steveyegge/beads` for compatibility. + ## Platform-Specific Installation ### macOS