The dolthub/gozstd dependency requires CGO. Several files were importing the dolt package without build constraints, causing CI failures when building with CGO_ENABLED=0 for Linux, FreeBSD, and Android. Changes: - Add //go:build cgo to federation.go and doctor/federation.go - Create dolt_server_cgo.go/nocgo.go to abstract dolt.Server usage - Create federation_nocgo.go with stub command explaining CGO requirement - Create doctor/federation_nocgo.go with stub health checks - Update daemon.go to use the dolt server abstraction Federation and Dolt-specific features are unavailable in non-CGO builds. Users are directed to pre-built binaries from GitHub releases. Fixes v0.49.0 CI failure. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
995 B
Go
35 lines
995 B
Go
//go:build !cgo
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var federationCmd = &cobra.Command{
|
|
Use: "federation",
|
|
GroupID: "sync",
|
|
Short: "Manage peer-to-peer federation (requires CGO)",
|
|
Long: `Federation commands require CGO and the Dolt storage backend.
|
|
|
|
This binary was built without CGO support. To use federation features:
|
|
1. Use pre-built binaries from GitHub releases, or
|
|
2. Build from source with CGO enabled
|
|
|
|
Federation enables synchronized issue tracking across multiple Gas Towns,
|
|
each maintaining their own Dolt database while sharing updates via remotes.`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println("Federation requires CGO and Dolt backend.")
|
|
fmt.Println("")
|
|
fmt.Println("This binary was built without CGO support. To use federation:")
|
|
fmt.Println(" 1. Download pre-built binaries from GitHub releases")
|
|
fmt.Println(" 2. Or build from source with CGO enabled")
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(federationCmd)
|
|
}
|