From 474d9e098fda7607f1e1801b3cb3ad43c1fa5294 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Wed, 15 Oct 2025 00:55:24 -0700 Subject: [PATCH] fix: Update minimum Go version requirement to 1.23 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #34 Problem: Users with Go 1.18 were unable to install beads because go.mod specifies 'go 1.23.0', which older Go toolchains cannot parse. The error "invalid go version '1.23.0': must match format 1.23" occurs because Go versions before 1.21 don't support the three-part version format. Root cause: Our dependencies (especially modernc.org/sqlite) require Go 1.23, which forces go.mod to use the 1.23.0 format. This is correct for our actual requirements, but was incorrectly documented as requiring only Go 1.21. Solution: 1. Updated install.sh to check for Go 1.23+ and show clear error messages if an older version is detected 2. Updated README.md to correctly state "requires Go 1.23+" instead of 1.21+ 3. go.mod already correctly specifies go 1.23.0 (no changes needed there) The version check in install.sh now: - Parses the Go version from 'go version' output - Compares major.minor version numbers - Fails fast with helpful upgrade instructions if Go < 1.23 This prevents confusing build errors and guides users to upgrade Go before attempting installation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- README.md | 2 +- install.sh | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7b5a86ef..26d82bcd 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ The installer will: ### Manual Install ```bash -# Using go install (requires Go 1.21+) +# Using go install (requires Go 1.23+) go install github.com/steveyegge/beads/cmd/bd@latest # Or build from source diff --git a/install.sh b/install.sh index 277cf2a1..0f3486a3 100755 --- a/install.sh +++ b/install.sh @@ -62,10 +62,27 @@ detect_platform() { echo "${os}-${arch}" } -# Check if Go is installed +# Check if Go is installed and meets minimum version check_go() { if command -v go &> /dev/null; then + local go_version=$(go version | awk '{print $3}' | sed 's/go//') log_info "Go detected: $(go version)" + + # Extract major and minor version numbers + local major=$(echo "$go_version" | cut -d. -f1) + local minor=$(echo "$go_version" | cut -d. -f2) + + # Check if Go version is 1.23 or later + if [ "$major" -eq 1 ] && [ "$minor" -lt 23 ]; then + log_error "Go 1.23 or later is required (found: $go_version)" + echo "" + echo "Please upgrade Go:" + echo " - Download from https://go.dev/dl/" + echo " - Or use your package manager to update" + echo "" + return 1 + fi + return 0 else return 1 @@ -158,7 +175,7 @@ build_from_source() { offer_go_installation() { log_warning "Go is not installed" echo "" - echo "bd requires Go 1.21 or later. You can:" + echo "bd requires Go 1.23 or later. You can:" echo " 1. Install Go from https://go.dev/dl/" echo " 2. Use your package manager:" echo " - macOS: brew install go"