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>
54 lines
1.4 KiB
Go
54 lines
1.4 KiB
Go
//go:build !cgo
|
|
|
|
package doctor
|
|
|
|
// CheckFederationRemotesAPI returns N/A when CGO is not available.
|
|
func CheckFederationRemotesAPI(path string) DoctorCheck {
|
|
return DoctorCheck{
|
|
Name: "Federation remotesapi",
|
|
Status: StatusOK,
|
|
Message: "N/A (requires CGO)",
|
|
Category: CategoryFederation,
|
|
}
|
|
}
|
|
|
|
// CheckFederationPeerConnectivity returns N/A when CGO is not available.
|
|
func CheckFederationPeerConnectivity(path string) DoctorCheck {
|
|
return DoctorCheck{
|
|
Name: "Peer Connectivity",
|
|
Status: StatusOK,
|
|
Message: "N/A (requires CGO)",
|
|
Category: CategoryFederation,
|
|
}
|
|
}
|
|
|
|
// CheckFederationSyncStaleness returns N/A when CGO is not available.
|
|
func CheckFederationSyncStaleness(path string) DoctorCheck {
|
|
return DoctorCheck{
|
|
Name: "Sync Staleness",
|
|
Status: StatusOK,
|
|
Message: "N/A (requires CGO)",
|
|
Category: CategoryFederation,
|
|
}
|
|
}
|
|
|
|
// CheckFederationConflicts returns N/A when CGO is not available.
|
|
func CheckFederationConflicts(path string) DoctorCheck {
|
|
return DoctorCheck{
|
|
Name: "Federation Conflicts",
|
|
Status: StatusOK,
|
|
Message: "N/A (requires CGO)",
|
|
Category: CategoryFederation,
|
|
}
|
|
}
|
|
|
|
// CheckDoltServerModeMismatch returns N/A when CGO is not available.
|
|
func CheckDoltServerModeMismatch(path string) DoctorCheck {
|
|
return DoctorCheck{
|
|
Name: "Dolt Mode",
|
|
Status: StatusOK,
|
|
Message: "N/A (requires CGO)",
|
|
Category: CategoryFederation,
|
|
}
|
|
}
|