From 2137693dad433942cf41df15c0259f8cbcdfe94d Mon Sep 17 00:00:00 2001 From: beads/crew/emma Date: Sat, 7 Feb 2026 21:21:24 -0800 Subject: [PATCH] revert: restore embedded Dolt mode (was only supposed to be removed from Gas Town) Revert commits e5330641 and 0df41523 which removed embedded Dolt mode from the beads codebase. The embedded Dolt removal was only intended for Gas Town, not for Beads. Restores: - dolthub/driver dependency and embedded connection path - Advisory flock (AccessLock) for concurrent process protection - Embedded connector lifecycle management in DoltStore - All CGO build tags across ~45 files - Vendored go-icu-regex library - nocgo stub files for non-CGO builds - Bootstrap and embedded_uow helpers - factory_dolt_test.go and dolt_singleprocess_test.go Merge conflict resolutions: - store.go: TCP fail-fast check wrapped inside if cfg.ServerMode - store.go: backtick-quoting for embedded CREATE DATABASE (prefix-based names) - perf_dolt.go: port references updated from 3306 to 3307 - ci.yml: restored continue-on-error for Nix (dolthub/driver requires Go 1.25.6+) Co-Authored-By: Claude Opus 4.6 Executed-By: beads/crew/emma Rig: beads Role: crew --- .github/workflows/ci.yml | 3 + Makefile | 17 +- THIRD_PARTY_LICENSES | 8 + cmd/bd/daemon.go | 10 +- cmd/bd/daemon_autostart.go | 2 +- cmd/bd/daemon_guard.go | 8 +- cmd/bd/daemon_lifecycle.go | 4 +- cmd/bd/daemons.go | 2 +- cmd/bd/direct_mode.go | 4 +- cmd/bd/doctor.go | 2 +- cmd/bd/doctor/dolt.go | 123 +- cmd/bd/doctor/federation.go | 1 + cmd/bd/doctor/federation_nocgo.go | 54 + cmd/bd/doctor/migration_validation.go | 15 +- cmd/bd/doctor/migration_validation_nocgo.go | 64 + .../doctor/migration_validation_nocgo_test.go | 64 + cmd/bd/doctor/migration_validation_test.go | 2 + cmd/bd/doctor/perf_dolt.go | 163 +- cmd/bd/doctor/server.go | 14 +- cmd/bd/dolt_server_cgo.go | 5 +- cmd/bd/dolt_server_nocgo.go | 51 + cmd/bd/dolt_singleprocess_test.go | 135 ++ cmd/bd/federation.go | 1 + cmd/bd/federation_nocgo.go | 35 + cmd/bd/init.go | 4 +- cmd/bd/main.go | 25 +- cmd/bd/migrate_dolt.go | 1 + cmd/bd/migrate_dolt_cmd.go | 2 + cmd/bd/migrate_dolt_cmd_nocgo.go | 35 + cmd/bd/migrate_dolt_nocgo.go | 41 + cmd/bd/sync_import.go | 2 +- docs/INSTALLING.md | 44 +- go.mod | 124 +- go.sum | 1430 +++++++++++++++++ internal/beads/beads.go | 9 +- internal/configfile/configfile.go | 47 +- internal/configfile/configfile_test.go | 58 +- internal/storage/dolt/access_lock.go | 97 ++ internal/storage/dolt/adaptive_length.go | 1 + internal/storage/dolt/bootstrap.go | 590 +++++++ internal/storage/dolt/bootstrap_test.go | 503 ++++++ internal/storage/dolt/concurrent_test.go | 2 +- internal/storage/dolt/config.go | 1 + internal/storage/dolt/credentials.go | 1 + internal/storage/dolt/dependencies.go | 5 +- .../dolt/dependencies_extended_test.go | 9 +- internal/storage/dolt/dirty.go | 1 + internal/storage/dolt/dolt_benchmark_test.go | 9 +- internal/storage/dolt/dolt_test.go | 6 +- internal/storage/dolt/embedded_uow.go | 90 ++ internal/storage/dolt/events.go | 1 + internal/storage/dolt/federation.go | 1 + internal/storage/dolt/history.go | 1 + internal/storage/dolt/history_test.go | 1 + .../dolt/hub_spokes_integration_test.go | 2 + internal/storage/dolt/issues.go | 1 + internal/storage/dolt/labels.go | 1 + internal/storage/dolt/labels_test.go | 5 +- internal/storage/dolt/migrations.go | 1 + .../dolt/migrations/001_wisp_type_column.go | 1 + .../dolt/migrations/002_spec_id_column.go | 1 + internal/storage/dolt/migrations/helpers.go | 1 + .../dolt/migrations/migrations_test.go | 108 +- internal/storage/dolt/nested_query_test.go | 4 + .../dolt/peer_sync_integration_test.go | 2 + internal/storage/dolt/procattr_unix.go | 2 +- internal/storage/dolt/procattr_windows.go | 2 +- internal/storage/dolt/process_unix.go | 2 +- internal/storage/dolt/process_windows.go | 2 +- internal/storage/dolt/queries.go | 1 + internal/storage/dolt/rename.go | 1 + internal/storage/dolt/retry_test.go | 31 +- internal/storage/dolt/schema.go | 1 + internal/storage/dolt/server.go | 5 +- .../storage/dolt/server_integration_test.go | 1 + internal/storage/dolt/store.go | 266 ++- internal/storage/dolt/transaction.go | 1 + internal/storage/dolt/util.go | 1 + internal/storage/dolt/versioned.go | 4 +- internal/storage/doltutil/close.go | 4 +- internal/storage/factory/factory.go | 39 +- internal/storage/factory/factory_dolt.go | 119 +- internal/storage/factory/factory_dolt_test.go | 77 + .../go-icu-regex/.github/workflows/test.yml | 46 + internal/third_party/go-icu-regex/.gitignore | 44 + internal/third_party/go-icu-regex/LICENSE | 202 +++ internal/third_party/go-icu-regex/README.md | 38 + .../third_party/go-icu-regex/format_repo.sh | 35 + internal/third_party/go-icu-regex/go.mod | 15 + internal/third_party/go-icu-regex/go.sum | 21 + .../go-icu-regex/internal/icu/file.cpp | 88 + .../go-icu-regex/internal/icu/file.h | 12 + .../go-icu-regex/internal/icu/icu.go | 182 +++ .../go-icu-regex/internal/icu/icu_test.go | 36 + .../third_party/go-icu-regex/regex_icu.go | 283 ++++ .../third_party/go-icu-regex/regex_test.go | 203 +++ .../third_party/go-icu-regex/regex_windows.go | 281 ++++ scripts/test.sh | 11 + 98 files changed, 5802 insertions(+), 309 deletions(-) create mode 100644 cmd/bd/doctor/federation_nocgo.go create mode 100644 cmd/bd/doctor/migration_validation_nocgo.go create mode 100644 cmd/bd/doctor/migration_validation_nocgo_test.go create mode 100644 cmd/bd/dolt_server_nocgo.go create mode 100644 cmd/bd/dolt_singleprocess_test.go create mode 100644 cmd/bd/federation_nocgo.go create mode 100644 cmd/bd/migrate_dolt_cmd_nocgo.go create mode 100644 cmd/bd/migrate_dolt_nocgo.go create mode 100644 internal/storage/dolt/access_lock.go create mode 100644 internal/storage/dolt/bootstrap.go create mode 100644 internal/storage/dolt/bootstrap_test.go create mode 100644 internal/storage/dolt/embedded_uow.go create mode 100644 internal/storage/factory/factory_dolt_test.go create mode 100644 internal/third_party/go-icu-regex/.github/workflows/test.yml create mode 100644 internal/third_party/go-icu-regex/.gitignore create mode 100644 internal/third_party/go-icu-regex/LICENSE create mode 100644 internal/third_party/go-icu-regex/README.md create mode 100644 internal/third_party/go-icu-regex/format_repo.sh create mode 100644 internal/third_party/go-icu-regex/go.mod create mode 100644 internal/third_party/go-icu-regex/go.sum create mode 100644 internal/third_party/go-icu-regex/internal/icu/file.cpp create mode 100644 internal/third_party/go-icu-regex/internal/icu/file.h create mode 100644 internal/third_party/go-icu-regex/internal/icu/icu.go create mode 100644 internal/third_party/go-icu-regex/internal/icu/icu_test.go create mode 100644 internal/third_party/go-icu-regex/regex_icu.go create mode 100644 internal/third_party/go-icu-regex/regex_test.go create mode 100644 internal/third_party/go-icu-regex/regex_windows.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fa805180..3d4d75521 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -193,6 +193,9 @@ jobs: test-nix: name: Test Nix Flake runs-on: ubuntu-latest + # Allow failure until nixpkgs updates Go to 1.25.6+ + # (dolthub/driver requires go 1.25.6, nixpkgs-unstable has go 1.25.1) + continue-on-error: true steps: - uses: actions/checkout@v6 - uses: cachix/install-nix-action@v31 diff --git a/Makefile b/Makefile index 2cd9f688c..70e1a6ae8 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,26 @@ BINARY := bd BUILD_DIR := . INSTALL_DIR := $(HOME)/.local/bin +# Dolt backend requires CGO for embedded database support. +# Without CGO, builds will fail with "dolt backend requires CGO". +export CGO_ENABLED := 1 + +# ICU4C is keg-only on macOS (Homebrew doesn't symlink it into /opt/homebrew). +# Dolt's go-icu-regex dependency needs these paths to compile and link. +ifeq ($(shell uname),Darwin) +ICU_PREFIX := $(shell brew --prefix icu4c 2>/dev/null) +ifneq ($(ICU_PREFIX),) +export CGO_CFLAGS += -I$(ICU_PREFIX)/include +export CGO_CPPFLAGS += -I$(ICU_PREFIX)/include +export CGO_LDFLAGS += -L$(ICU_PREFIX)/lib +endif +endif + # Build the bd binary build: @echo "Building bd..." ifeq ($(OS),Windows_NT) - go build -ldflags="-X main.Build=$$(git rev-parse --short HEAD)" -o $(BUILD_DIR)/$(BINARY) ./cmd/bd + go build -tags gms_pure_go -ldflags="-X main.Build=$$(git rev-parse --short HEAD)" -o $(BUILD_DIR)/$(BINARY) ./cmd/bd else go build -ldflags="-X main.Build=$$(git rev-parse --short HEAD)" -o $(BUILD_DIR)/$(BINARY) ./cmd/bd ifeq ($(shell uname),Darwin) diff --git a/THIRD_PARTY_LICENSES b/THIRD_PARTY_LICENSES index a939be992..21a0eeff5 100644 --- a/THIRD_PARTY_LICENSES +++ b/THIRD_PARTY_LICENSES @@ -19,6 +19,14 @@ Repository: https://github.com/dolthub/go-mysql-server License: Apache License 2.0 Copyright: Copyright 2019-2026 DoltHub, Inc. +-------------------------------------------------------------------------------- +dolthub/driver +-------------------------------------------------------------------------------- + +Repository: https://github.com/dolthub/driver +License: Apache License 2.0 +Copyright: Copyright 2019-2026 DoltHub, Inc. + ================================================================================ Apache License 2.0 ================================================================================ diff --git a/cmd/bd/daemon.go b/cmd/bd/daemon.go index 43c9ef81c..7aa1bac58 100644 --- a/cmd/bd/daemon.go +++ b/cmd/bd/daemon.go @@ -366,7 +366,8 @@ func runDaemonLoop(interval time.Duration, autoCommit, autoPush, autoPull, local backend = configfile.BackendSQLite } - // Daemon is not supported with single-process backends + // Daemon is not supported with single-process backends (e.g., embedded Dolt) + // Note: Dolt server mode supports multi-process, so check capabilities not backend type cfg, cfgErr := configfile.Load(beadsDir) if cfgErr == nil && cfg != nil && cfg.GetCapabilities().SingleProcessOnly { errMsg := fmt.Sprintf(`DAEMON NOT SUPPORTED WITH %s BACKEND @@ -492,7 +493,8 @@ The daemon will now exit.`, strings.ToUpper(backend)) "sql_port", doltServer.SQLPort(), "remotesapi_port", doltServer.RemotesAPIPort()) - // Configure factory with server connection details + // Configure factory to use server mode + factoryOpts.ServerMode = true factoryOpts.ServerHost = doltServer.Host() factoryOpts.ServerPort = doltServer.SQLPort() } @@ -510,8 +512,10 @@ The daemon will now exit.`, strings.ToUpper(backend)) if sqliteStore, ok := store.(*sqlite.SQLiteStorage); ok { sqliteStore.EnableFreshnessChecking() log.Info("database opened", "path", store.Path(), "backend", "sqlite", "freshness_checking", true) + } else if federation { + log.Info("database opened", "path", store.Path(), "backend", "dolt", "mode", "federation/server") } else { - log.Info("database opened", "path", store.Path(), "backend", "dolt", "mode", "server") + log.Info("database opened", "path", store.Path(), "backend", "dolt", "mode", "embedded") } // Auto-upgrade .beads/.gitignore if outdated diff --git a/cmd/bd/daemon_autostart.go b/cmd/bd/daemon_autostart.go index 9a7ec8d2d..a82c98ded 100644 --- a/cmd/bd/daemon_autostart.go +++ b/cmd/bd/daemon_autostart.go @@ -78,7 +78,7 @@ func isDoltBackendImpl() bool { } // singleProcessOnlyBackend returns true if the current workspace backend is configured -// as single-process-only. +// as single-process-only (currently Dolt embedded). // This is a wrapper that calls singleProcessOnlyBackendFn for testability. func singleProcessOnlyBackend() bool { return singleProcessOnlyBackendFn() diff --git a/cmd/bd/daemon_guard.go b/cmd/bd/daemon_guard.go index 63fbf06b8..105e8d3e8 100644 --- a/cmd/bd/daemon_guard.go +++ b/cmd/bd/daemon_guard.go @@ -20,13 +20,13 @@ func singleProcessBackendHelp(backend string) string { } // guardDaemonStartForDolt blocks daemon start/restart commands when the current -// workspace backend is single-process-only, unless --federation is specified. +// workspace backend is Dolt, unless --federation is specified. // -// Rationale: some backends may be single-writer at the OS-process level. The +// Rationale: embedded Dolt is effectively single-writer at the OS-process level. The // daemon architecture relies on multiple processes (CLI + daemon + helper spawns), -// which can trigger lock contention. +// which can trigger lock contention and transient "read-only" failures. // -// Exception: --federation flag enables multi-writer mode. +// Exception: --federation flag enables dolt sql-server mode which is multi-writer. // // Note: This guard should only be attached to commands that START a daemon process // (start, restart). Read-only commands (status, stop, logs, health, list) are allowed diff --git a/cmd/bd/daemon_lifecycle.go b/cmd/bd/daemon_lifecycle.go index f6f921a1d..fe2a31393 100644 --- a/cmd/bd/daemon_lifecycle.go +++ b/cmd/bd/daemon_lifecycle.go @@ -377,8 +377,8 @@ func startDaemon(interval time.Duration, autoCommit, autoPush, autoPull, localMo os.Exit(1) } - // Guardrail: single-process backends must never spawn a daemon process. - // Exception: federation mode enables multi-writer support. + // Guardrail: single-process backends (e.g., Dolt embedded) must never spawn a daemon process. + // Exception: federation mode runs dolt sql-server which enables multi-writer support. // This should already be blocked by command guards, but keep it defensive. if singleProcessOnlyBackend() && !federation { fmt.Fprintf(os.Stderr, "Error: daemon mode is not supported for single-process backends (e.g., dolt). Hint: use sqlite backend for daemon mode, use --federation for dolt server mode, or run commands in direct mode\n") diff --git a/cmd/bd/daemons.go b/cmd/bd/daemons.go index 580081c17..305b61747 100644 --- a/cmd/bd/daemons.go +++ b/cmd/bd/daemons.go @@ -258,7 +258,7 @@ Stops the daemon gracefully, then starts a new one.`, } workspace := targetDaemon.WorkspacePath - // Guardrail: don't (re)start daemons for single-process backends. + // Guardrail: don't (re)start daemons for single-process backends (e.g., embedded Dolt). // This command may be run from a different workspace, so check the target workspace. // Note: Dolt server mode supports multi-process, so GetCapabilities() is used. targetBeadsDir := beads.FollowRedirect(filepath.Join(workspace, ".beads")) diff --git a/cmd/bd/direct_mode.go b/cmd/bd/direct_mode.go index b7d9d49e6..7268ad427 100644 --- a/cmd/bd/direct_mode.go +++ b/cmd/bd/direct_mode.go @@ -55,7 +55,7 @@ func disableDaemonForFallback(reason string) { } // ensureStoreActive guarantees that a storage backend is initialized and tracked. -// Uses the factory to respect metadata.json backend configuration (SQLite or Dolt server). +// Uses the factory to respect metadata.json backend configuration (SQLite, Dolt embedded, or Dolt server). func ensureStoreActive() error { lockStore() active := isStoreActive() && getStore() != nil @@ -91,7 +91,7 @@ func ensureStoreActive() error { } } - // Use factory to create the appropriate backend (SQLite or Dolt server) + // Use factory to create the appropriate backend (SQLite, Dolt embedded, or Dolt server) // based on metadata.json configuration store, err := factory.NewFromConfig(getRootContext(), beadsDir) if err != nil { diff --git a/cmd/bd/doctor.go b/cmd/bd/doctor.go index cb30ae57d..569c9bc5e 100644 --- a/cmd/bd/doctor.go +++ b/cmd/bd/doctor.go @@ -488,7 +488,7 @@ func runDiagnostics(path string) doctorResult { result.OverallOK = false // Unresolved conflicts are a real problem } - // Check 8h: Dolt server mode configuration + // Check 8h: Dolt init vs embedded mode mismatch doltModeCheck := convertWithCategory(doctor.CheckDoltServerModeMismatch(path), doctor.CategoryFederation) result.Checks = append(result.Checks, doltModeCheck) diff --git a/cmd/bd/doctor/dolt.go b/cmd/bd/doctor/dolt.go index eb93fad18..cdf222a9f 100644 --- a/cmd/bd/doctor/dolt.go +++ b/cmd/bd/doctor/dolt.go @@ -1,3 +1,5 @@ +//go:build cgo + package doctor import ( @@ -7,12 +9,21 @@ import ( "os" "path/filepath" - _ "github.com/go-sql-driver/mysql" + // Import Dolt driver for direct connection + _ "github.com/dolthub/driver" "github.com/steveyegge/beads/internal/configfile" + "github.com/steveyegge/beads/internal/storage/doltutil" "github.com/steveyegge/beads/internal/storage/factory" ) +// closeDoltDBWithTimeout closes a sql.DB with a timeout to prevent indefinite hangs. +// This is needed because embedded Dolt can hang on close. +func closeDoltDBWithTimeout(db *sql.DB) { + // Use the shared helper; ignore errors since we're just cleaning up + _ = doltutil.CloseWithTimeout("db", db.Close) +} + // GetBackend returns the configured backend type from configuration. // It checks config.yaml first (storage-backend key), then falls back to metadata.json. // Returns "sqlite" (default) or "dolt". @@ -26,41 +37,6 @@ func IsDoltBackend(beadsDir string) bool { return GetBackend(beadsDir) == configfile.BackendDolt } -// openDoltServerDB opens a connection to the Dolt server via MySQL protocol. -// Returns the connection and any error. -func openDoltServerDB(beadsDir string) (*sql.DB, error) { - cfg, err := configfile.Load(beadsDir) - if err != nil || cfg == nil { - // Fall back to defaults - cfg = configfile.DefaultConfig() - } - - host := cfg.GetDoltServerHost() - if host == "" { - host = "127.0.0.1" - } - port := cfg.GetDoltServerPort() - user := cfg.GetDoltServerUser() - if user == "" { - user = "root" - } - database := cfg.GetDoltDatabase() - if database == "" { - database = "beads" - } - - connStr := fmt.Sprintf("%s@tcp(%s:%d)/%s?parseTime=true", user, host, port, database) - db, err := sql.Open("mysql", connStr) - if err != nil { - return nil, fmt.Errorf("failed to open Dolt server connection: %w", err) - } - - db.SetMaxOpenConns(5) - db.SetMaxIdleConns(2) - - return db, nil -} - // CheckDoltConnection verifies connectivity to the Dolt database. func CheckDoltConnection(path string) DoctorCheck { beadsDir := resolveBeadsDir(filepath.Join(path, ".beads")) @@ -88,8 +64,11 @@ func CheckDoltConnection(path string) DoctorCheck { } } - // Try to connect to Dolt server - db, err := openDoltServerDB(beadsDir) + // Try to connect to Dolt + doltDir := filepath.Join(beadsDir, "dolt") + connStr := fmt.Sprintf("file://%s?commitname=beads&commitemail=beads@local", doltDir) + + db, err := sql.Open("dolt", connStr) if err != nil { return DoctorCheck{ Name: "Dolt Connection", @@ -99,17 +78,26 @@ func CheckDoltConnection(path string) DoctorCheck { Category: CategoryCore, } } - defer db.Close() + defer closeDoltDBWithTimeout(db) - // Ping + // Switch to beads database and ping ctx := context.Background() + if _, err := db.ExecContext(ctx, "USE beads"); err != nil { + return DoctorCheck{ + Name: "Dolt Connection", + Status: StatusError, + Message: "Failed to switch to beads database", + Detail: err.Error(), + Category: CategoryCore, + } + } + if err := db.PingContext(ctx); err != nil { return DoctorCheck{ Name: "Dolt Connection", Status: StatusError, Message: "Failed to ping Dolt database", Detail: err.Error(), - Fix: "Ensure dolt sql-server is running", Category: CategoryCore, } } @@ -118,7 +106,7 @@ func CheckDoltConnection(path string) DoctorCheck { Name: "Dolt Connection", Status: StatusOK, Message: "Connected successfully", - Detail: "Storage: Dolt (server mode)", + Detail: "Storage: Dolt", Category: CategoryCore, } } @@ -137,7 +125,10 @@ func CheckDoltSchema(path string) DoctorCheck { } } - db, err := openDoltServerDB(beadsDir) + doltDir := filepath.Join(beadsDir, "dolt") + connStr := fmt.Sprintf("file://%s?commitname=beads&commitemail=beads@local", doltDir) + + db, err := sql.Open("dolt", connStr) if err != nil { return DoctorCheck{ Name: "Dolt Schema", @@ -147,9 +138,18 @@ func CheckDoltSchema(path string) DoctorCheck { Category: CategoryCore, } } - defer db.Close() + defer closeDoltDBWithTimeout(db) ctx := context.Background() + if _, err := db.ExecContext(ctx, "USE beads"); err != nil { + return DoctorCheck{ + Name: "Dolt Schema", + Status: StatusError, + Message: "Failed to switch to beads database", + Detail: err.Error(), + Category: CategoryCore, + } + } // Check required tables requiredTables := []string{"issues", "dependencies", "config", "labels", "events"} @@ -213,8 +213,11 @@ func CheckDoltIssueCount(path string) DoctorCheck { } } - // Get Dolt count via server - db, err := openDoltServerDB(beadsDir) + // Get Dolt count + doltDir := filepath.Join(beadsDir, "dolt") + connStr := fmt.Sprintf("file://%s?commitname=beads&commitemail=beads@local", doltDir) + + db, err := sql.Open("dolt", connStr) if err != nil { return DoctorCheck{ Name: "Dolt-JSONL Sync", @@ -224,9 +227,19 @@ func CheckDoltIssueCount(path string) DoctorCheck { Category: CategoryData, } } - defer db.Close() + defer closeDoltDBWithTimeout(db) ctx := context.Background() + if _, err := db.ExecContext(ctx, "USE beads"); err != nil { + return DoctorCheck{ + Name: "Dolt-JSONL Sync", + Status: StatusError, + Message: "Failed to switch to beads database", + Detail: err.Error(), + Category: CategoryData, + } + } + var doltCount int err = db.QueryRowContext(ctx, "SELECT COUNT(*) FROM issues").Scan(&doltCount) if err != nil { @@ -271,7 +284,10 @@ func CheckDoltStatus(path string) DoctorCheck { } } - db, err := openDoltServerDB(beadsDir) + doltDir := filepath.Join(beadsDir, "dolt") + connStr := fmt.Sprintf("file://%s?commitname=beads&commitemail=beads@local", doltDir) + + db, err := sql.Open("dolt", connStr) if err != nil { return DoctorCheck{ Name: "Dolt Status", @@ -281,9 +297,18 @@ func CheckDoltStatus(path string) DoctorCheck { Category: CategoryData, } } - defer db.Close() + defer closeDoltDBWithTimeout(db) ctx := context.Background() + if _, err := db.ExecContext(ctx, "USE beads"); err != nil { + return DoctorCheck{ + Name: "Dolt Status", + Status: StatusWarning, + Message: "Could not switch to beads database", + Detail: err.Error(), + Category: CategoryData, + } + } // Check dolt_status for uncommitted changes rows, err := db.QueryContext(ctx, "SELECT table_name, staged, status FROM dolt_status") diff --git a/cmd/bd/doctor/federation.go b/cmd/bd/doctor/federation.go index fb9661d6d..66045fac2 100644 --- a/cmd/bd/doctor/federation.go +++ b/cmd/bd/doctor/federation.go @@ -1,3 +1,4 @@ +//go:build cgo package doctor import ( diff --git a/cmd/bd/doctor/federation_nocgo.go b/cmd/bd/doctor/federation_nocgo.go new file mode 100644 index 000000000..738d6117a --- /dev/null +++ b/cmd/bd/doctor/federation_nocgo.go @@ -0,0 +1,54 @@ +//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, + } +} + + diff --git a/cmd/bd/doctor/migration_validation.go b/cmd/bd/doctor/migration_validation.go index dc51cadcf..a73960cea 100644 --- a/cmd/bd/doctor/migration_validation.go +++ b/cmd/bd/doctor/migration_validation.go @@ -1,3 +1,5 @@ +//go:build cgo + package doctor import ( @@ -10,6 +12,9 @@ import ( "path/filepath" "strings" + // Import Dolt driver for direct connection + _ "github.com/dolthub/driver" + "github.com/steveyegge/beads/internal/beads" "github.com/steveyegge/beads/internal/configfile" "github.com/steveyegge/beads/internal/storage" @@ -516,15 +521,21 @@ func compareDoltWithJSONL(ctx context.Context, store storage.Storage, jsonlIDs m return missing } -// checkDoltLocks checks for uncommitted changes in Dolt via server connection. +// checkDoltLocks checks for uncommitted changes in Dolt. func checkDoltLocks(beadsDir string) (bool, string) { - db, err := openDoltServerDB(beadsDir) + doltDir := filepath.Join(beadsDir, "dolt") + connStr := fmt.Sprintf("file://%s?commitname=beads&commitemail=beads@local", doltDir) + + db, err := sql.Open("dolt", connStr) if err != nil { return false, "" } defer db.Close() ctx := context.Background() + if _, err := db.ExecContext(ctx, "USE beads"); err != nil { + return false, "" + } // Check dolt_status for uncommitted changes rows, err := db.QueryContext(ctx, "SELECT table_name, staged, status FROM dolt_status") diff --git a/cmd/bd/doctor/migration_validation_nocgo.go b/cmd/bd/doctor/migration_validation_nocgo.go new file mode 100644 index 000000000..c35457e09 --- /dev/null +++ b/cmd/bd/doctor/migration_validation_nocgo.go @@ -0,0 +1,64 @@ +//go:build !cgo + +package doctor + +// MigrationValidationResult provides machine-parseable migration validation output. +// This stub exists for non-CGO builds where Dolt is not available. +type MigrationValidationResult struct { + Phase string `json:"phase"` + Ready bool `json:"ready"` + Backend string `json:"backend"` + JSONLCount int `json:"jsonl_count"` + SQLiteCount int `json:"sqlite_count"` + DoltCount int `json:"dolt_count"` + MissingInDB []string `json:"missing_in_db"` + MissingInJSONL []string `json:"missing_in_jsonl"` + Errors []string `json:"errors"` + Warnings []string `json:"warnings"` + JSONLValid bool `json:"jsonl_valid"` + JSONLMalformed int `json:"jsonl_malformed"` + DoltHealthy bool `json:"dolt_healthy"` + DoltLocked bool `json:"dolt_locked"` + SchemaValid bool `json:"schema_valid"` + RecommendedFix string `json:"recommended_fix"` +} + +// CheckMigrationReadiness returns N/A when CGO is not available. +func CheckMigrationReadiness(path string) (DoctorCheck, MigrationValidationResult) { + return DoctorCheck{ + Name: "Migration Readiness", + Status: StatusOK, + Message: "N/A (requires CGO for Dolt)", + Category: CategoryMaintenance, + }, MigrationValidationResult{ + Phase: "pre-migration", + Ready: false, + Backend: "unknown", + Errors: []string{"Dolt migration requires CGO build"}, + } +} + +// CheckMigrationCompletion returns N/A when CGO is not available. +func CheckMigrationCompletion(path string) (DoctorCheck, MigrationValidationResult) { + return DoctorCheck{ + Name: "Migration Completion", + Status: StatusOK, + Message: "N/A (requires CGO for Dolt)", + Category: CategoryMaintenance, + }, MigrationValidationResult{ + Phase: "post-migration", + Ready: false, + Backend: "unknown", + Errors: []string{"Dolt migration requires CGO build"}, + } +} + +// CheckDoltLocks returns N/A when CGO is not available. +func CheckDoltLocks(path string) DoctorCheck { + return DoctorCheck{ + Name: "Dolt Locks", + Status: StatusOK, + Message: "N/A (requires CGO for Dolt)", + Category: CategoryMaintenance, + } +} diff --git a/cmd/bd/doctor/migration_validation_nocgo_test.go b/cmd/bd/doctor/migration_validation_nocgo_test.go new file mode 100644 index 000000000..7b4139fa7 --- /dev/null +++ b/cmd/bd/doctor/migration_validation_nocgo_test.go @@ -0,0 +1,64 @@ +//go:build !cgo + +package doctor + +import ( + "testing" +) + +func TestCheckMigrationReadiness_NoCGO(t *testing.T) { + check, result := CheckMigrationReadiness("/tmp/nonexistent") + + if check.Status != StatusOK { + t.Errorf("status = %q, want %q", check.Status, StatusOK) + } + + if check.Message != "N/A (requires CGO for Dolt)" { + t.Errorf("message = %q, want %q", check.Message, "N/A (requires CGO for Dolt)") + } + + if result.Ready { + t.Error("expected Ready = false in nocgo mode") + } + + if len(result.Errors) == 0 { + t.Error("expected error message about CGO") + } +} + +func TestCheckMigrationCompletion_NoCGO(t *testing.T) { + check, result := CheckMigrationCompletion("/tmp/nonexistent") + + if check.Status != StatusOK { + t.Errorf("status = %q, want %q", check.Status, StatusOK) + } + + if result.Ready { + t.Error("expected Ready = false in nocgo mode") + } +} + +func TestCheckDoltLocks_NoCGO(t *testing.T) { + check := CheckDoltLocks("/tmp/nonexistent") + + if check.Status != StatusOK { + t.Errorf("status = %q, want %q", check.Status, StatusOK) + } + + if check.Message != "N/A (requires CGO for Dolt)" { + t.Errorf("message = %q, want %q", check.Message, "N/A (requires CGO for Dolt)") + } +} + +func TestMigrationValidationResult_NoCGO(t *testing.T) { + // Test that the struct is properly defined even without CGO + result := MigrationValidationResult{ + Phase: "test", + Ready: false, + Backend: "unknown", + } + + if result.Phase != "test" { + t.Errorf("Phase = %q, want %q", result.Phase, "test") + } +} diff --git a/cmd/bd/doctor/migration_validation_test.go b/cmd/bd/doctor/migration_validation_test.go index 10389630c..192d2ddf7 100644 --- a/cmd/bd/doctor/migration_validation_test.go +++ b/cmd/bd/doctor/migration_validation_test.go @@ -1,3 +1,5 @@ +//go:build cgo + package doctor import ( diff --git a/cmd/bd/doctor/perf_dolt.go b/cmd/bd/doctor/perf_dolt.go index a9779162a..d54f0373c 100644 --- a/cmd/bd/doctor/perf_dolt.go +++ b/cmd/bd/doctor/perf_dolt.go @@ -1,3 +1,5 @@ +//go:build cgo + package doctor import ( @@ -11,15 +13,15 @@ import ( "strings" "time" + _ "github.com/dolthub/driver" _ "github.com/go-sql-driver/mysql" - - "github.com/steveyegge/beads/internal/configfile" ) // DoltPerfMetrics holds performance metrics for Dolt operations type DoltPerfMetrics struct { - Backend string // "dolt-server" - ServerStatus string // "running" or "not running" + Backend string // "dolt-embedded" or "dolt-server" + ServerMode bool // Whether connected via sql-server + ServerStatus string // "running", "not running", or N/A Platform string // OS/arch GoVersion string // Go runtime version DoltVersion string // Dolt version if available @@ -55,17 +57,9 @@ func RunDoltPerformanceDiagnostics(path string, enableProfiling bool) (*DoltPerf GoVersion: runtime.Version(), } - // Load config for server connection settings - cfg, err := configfile.Load(beadsDir) - if err != nil || cfg == nil { - cfg = configfile.DefaultConfig() - } - host := cfg.GetDoltServerHost() - port := cfg.GetDoltServerPort() - - // Check if server is running + // Check if server mode is available doltDir := filepath.Join(beadsDir, "dolt") - serverRunning := isDoltServerRunning(host, port) + serverRunning := isDoltServerRunning("127.0.0.1", 3307) if serverRunning { metrics.ServerStatus = "running" } else { @@ -83,13 +77,18 @@ func RunDoltPerformanceDiagnostics(path string, enableProfiling bool) (*DoltPerf } } - // Run server mode diagnostics - if !serverRunning { - return metrics, fmt.Errorf("dolt sql-server is not running; start it with: dolt sql-server") - } - - if err := runDoltServerDiagnostics(metrics, host, port); err != nil { - return metrics, fmt.Errorf("server mode diagnostics failed: %w", err) + // Connect and run diagnostics - try server mode first if available + if serverRunning { + if err := runDoltServerDiagnostics(metrics, "127.0.0.1", 3307); err != nil { + fmt.Fprintf(os.Stderr, "Server mode diagnostics failed, falling back to embedded: %v\n", err) + if err := runDoltEmbeddedDiagnostics(metrics, doltDir); err != nil { + return metrics, fmt.Errorf("embedded mode diagnostics failed: %w", err) + } + } + } else { + if err := runDoltEmbeddedDiagnostics(metrics, doltDir); err != nil { + return metrics, fmt.Errorf("embedded mode diagnostics failed: %w", err) + } } // Calculate database size @@ -101,6 +100,7 @@ func RunDoltPerformanceDiagnostics(path string, enableProfiling bool) (*DoltPerf // runDoltServerDiagnostics runs diagnostics via dolt sql-server func runDoltServerDiagnostics(metrics *DoltPerfMetrics, host string, port int) error { metrics.Backend = "dolt-server" + metrics.ServerMode = true dsn := fmt.Sprintf("root:@tcp(%s:%d)/beads?parseTime=true", host, port) @@ -126,6 +126,41 @@ func runDoltServerDiagnostics(metrics *DoltPerfMetrics, host string, port int) e return runDoltDiagnosticQueries(ctx, db, metrics) } +// runDoltEmbeddedDiagnostics runs diagnostics via embedded Dolt +func runDoltEmbeddedDiagnostics(metrics *DoltPerfMetrics, doltDir string) error { + metrics.Backend = "dolt-embedded" + metrics.ServerMode = false + + connStr := fmt.Sprintf("file://%s?commitname=beads&commitemail=beads@local", doltDir) + + // Measure connection time (includes bootstrap overhead) + start := time.Now() + db, err := sql.Open("dolt", connStr) + if err != nil { + return fmt.Errorf("failed to open Dolt database: %w", err) + } + defer closeDoltDBWithTimeout(db) + + // Single connection for embedded mode + db.SetMaxOpenConns(1) + db.SetMaxIdleConns(1) + + ctx := context.Background() + + // Switch to beads database + if _, err := db.ExecContext(ctx, "USE beads"); err != nil { + return fmt.Errorf("failed to switch to beads database: %w", err) + } + + if err := db.PingContext(ctx); err != nil { + return fmt.Errorf("failed to ping database: %w", err) + } + metrics.ConnectionTime = time.Since(start).Milliseconds() + + // Run all diagnostics + return runDoltDiagnosticQueries(ctx, db, metrics) +} + // runDoltDiagnosticQueries runs the diagnostic queries and populates metrics func runDoltDiagnosticQueries(ctx context.Context, db *sql.DB, metrics *DoltPerfMetrics) error { // Get issue counts @@ -275,7 +310,7 @@ func PrintDoltPerfReport(metrics *DoltPerfMetrics) { fmt.Println(strings.Repeat("=", 50)) fmt.Printf("\nBackend: %s\n", metrics.Backend) - fmt.Printf("Server Status: %s\n", metrics.ServerStatus) + fmt.Printf("Server Mode: %v (status: %s)\n", metrics.ServerMode, metrics.ServerStatus) fmt.Printf("Platform: %s\n", metrics.Platform) fmt.Printf("Go: %s\n", metrics.GoVersion) fmt.Printf("Dolt: %s\n", metrics.DoltVersion) @@ -288,7 +323,7 @@ func PrintDoltPerfReport(metrics *DoltPerfMetrics) { fmt.Printf(" Database size: %s\n", metrics.DatabaseSize) fmt.Printf("\nOperation Performance (ms):\n") - fmt.Printf(" Connection: %s\n", formatTiming(metrics.ConnectionTime)) + fmt.Printf(" Connection/Bootstrap: %s\n", formatTiming(metrics.ConnectionTime)) fmt.Printf(" bd ready (GetReadyWork): %s\n", formatTiming(metrics.ReadyWorkTime)) fmt.Printf(" bd list --status=open: %s\n", formatTiming(metrics.ListOpenTime)) fmt.Printf(" bd show : %s\n", formatTiming(metrics.ShowIssueTime)) @@ -319,6 +354,17 @@ func assessDoltPerformance(metrics *DoltPerfMetrics) { var warnings []string var recommendations []string + // Check connection time (embedded mode bootstrap overhead) + if !metrics.ServerMode && metrics.ConnectionTime > 500 { + warnings = append(warnings, fmt.Sprintf("High bootstrap time (%dms) in embedded mode", metrics.ConnectionTime)) + recommendations = append(recommendations, "Consider using server mode: set BEADS_DOLT_SERVER_MODE=1") + } + + // Check if server mode is available but not being used + if !metrics.ServerMode && metrics.ServerStatus == "running" { + recommendations = append(recommendations, "Server is running but not being used. Enable server mode for better performance.") + } + // Check ready work query time if metrics.ReadyWorkTime > 200 { warnings = append(warnings, fmt.Sprintf("Slow ready-work query (%dms)", metrics.ReadyWorkTime)) @@ -381,7 +427,7 @@ func CheckDoltPerformance(path string) DoctorCheck { var issues []string if metrics.ConnectionTime > 1000 { - issues = append(issues, fmt.Sprintf("slow connection (%dms)", metrics.ConnectionTime)) + issues = append(issues, fmt.Sprintf("slow bootstrap (%dms)", metrics.ConnectionTime)) } if metrics.ReadyWorkTime > 500 { @@ -389,19 +435,84 @@ func CheckDoltPerformance(path string) DoctorCheck { } if len(issues) > 0 { + fix := "Run 'bd doctor perf-dolt' for detailed analysis" + if !metrics.ServerMode && metrics.ServerStatus != "running" { + fix = "Consider enabling server mode: BEADS_DOLT_SERVER_MODE=1" + } return DoctorCheck{ Name: "Dolt Performance", Status: StatusWarning, Message: strings.Join(issues, "; "), - Fix: "Run 'bd doctor perf-dolt' for detailed analysis", + Fix: fix, Category: CategoryPerformance, } } + mode := "embedded" + if metrics.ServerMode { + mode = "server" + } return DoctorCheck{ Name: "Dolt Performance", Status: StatusOK, - Message: fmt.Sprintf("OK (server mode, connect: %dms, ready: %dms)", metrics.ConnectionTime, metrics.ReadyWorkTime), + Message: fmt.Sprintf("OK (mode: %s, connect: %dms, ready: %dms)", mode, metrics.ConnectionTime, metrics.ReadyWorkTime), Category: CategoryPerformance, } } + +// CompareDoltModes runs diagnostics in both embedded and server mode for comparison +func CompareDoltModes(path string) error { + beadsDir := resolveBeadsDir(filepath.Join(path, ".beads")) + if !IsDoltBackend(beadsDir) { + return fmt.Errorf("not a Dolt backend") + } + + doltDir := filepath.Join(beadsDir, "dolt") + serverRunning := isDoltServerRunning("127.0.0.1", 3307) + + fmt.Println("\nDolt Mode Comparison") + fmt.Println(strings.Repeat("=", 50)) + + // Run embedded mode diagnostics + fmt.Println("\n[Embedded Mode]") + embeddedMetrics := &DoltPerfMetrics{} + if err := runDoltEmbeddedDiagnostics(embeddedMetrics, doltDir); err != nil { + fmt.Printf(" Error: %v\n", err) + } else { + fmt.Printf(" Connection time: %dms\n", embeddedMetrics.ConnectionTime) + fmt.Printf(" Ready-work query: %dms\n", embeddedMetrics.ReadyWorkTime) + fmt.Printf(" List open query: %dms\n", embeddedMetrics.ListOpenTime) + fmt.Printf(" Complex query: %dms\n", embeddedMetrics.ComplexQueryTime) + } + + // Run server mode diagnostics if available + if serverRunning { + fmt.Println("\n[Server Mode]") + serverMetrics := &DoltPerfMetrics{} + if err := runDoltServerDiagnostics(serverMetrics, "127.0.0.1", 3307); err != nil { + fmt.Printf(" Error: %v\n", err) + } else { + fmt.Printf(" Connection time: %dms\n", serverMetrics.ConnectionTime) + fmt.Printf(" Ready-work query: %dms\n", serverMetrics.ReadyWorkTime) + fmt.Printf(" List open query: %dms\n", serverMetrics.ListOpenTime) + fmt.Printf(" Complex query: %dms\n", serverMetrics.ComplexQueryTime) + + // Print comparison + if embeddedMetrics.ConnectionTime > 0 && serverMetrics.ConnectionTime > 0 { + fmt.Println("\n[Comparison]") + fmt.Printf(" Connection speedup: %.1fx faster in server mode\n", + float64(embeddedMetrics.ConnectionTime)/float64(serverMetrics.ConnectionTime)) + if embeddedMetrics.ReadyWorkTime > 0 && serverMetrics.ReadyWorkTime > 0 { + fmt.Printf(" Ready-work speedup: %.1fx\n", + float64(embeddedMetrics.ReadyWorkTime)/float64(serverMetrics.ReadyWorkTime)) + } + } + } + } else { + fmt.Println("\n[Server Mode]") + fmt.Println(" Not available (start with: dolt sql-server)") + } + + fmt.Println() + return nil +} diff --git a/cmd/bd/doctor/server.go b/cmd/bd/doctor/server.go index 45262dbaa..a4b13ac61 100644 --- a/cmd/bd/doctor/server.go +++ b/cmd/bd/doctor/server.go @@ -69,7 +69,19 @@ func RunServerHealthChecks(path string) ServerHealthResult { return result } - // Run server health checks + // Check if server mode is configured + if !cfg.IsDoltServerMode() { + result.Checks = append(result.Checks, DoctorCheck{ + Name: "Server Config", + Status: StatusOK, + Message: fmt.Sprintf("Dolt mode is '%s' (embedded is the default)", cfg.GetDoltMode()), + Detail: "Server health checks only apply when dolt_mode is explicitly set to 'server'", + Category: CategoryFederation, + }) + return result + } + + // Server mode is configured - run health checks host := cfg.GetDoltServerHost() port := cfg.GetDoltServerPort() diff --git a/cmd/bd/dolt_server_cgo.go b/cmd/bd/dolt_server_cgo.go index 2e3693b44..500ee5780 100644 --- a/cmd/bd/dolt_server_cgo.go +++ b/cmd/bd/dolt_server_cgo.go @@ -1,3 +1,4 @@ +//go:build cgo package main import ( @@ -6,7 +7,7 @@ import ( "github.com/steveyegge/beads/internal/storage/dolt" ) -// DoltServerHandle wraps a dolt.Server +// DoltServerHandle wraps a dolt.Server for CGO builds type DoltServerHandle struct { server *dolt.Server } @@ -66,7 +67,7 @@ func (h *DoltServerHandle) Host() string { return "" } -// DoltServerAvailable returns true (Dolt server is always available) +// DoltServerAvailable returns true when CGO is available func DoltServerAvailable() bool { return true } diff --git a/cmd/bd/dolt_server_nocgo.go b/cmd/bd/dolt_server_nocgo.go new file mode 100644 index 000000000..590099fa7 --- /dev/null +++ b/cmd/bd/dolt_server_nocgo.go @@ -0,0 +1,51 @@ +//go:build !cgo +package main + +import ( + "context" + "errors" +) + +// DoltServerHandle is a stub for non-CGO builds +type DoltServerHandle struct{} + +// DoltDefaultSQLPort is the default SQL port for dolt server +const DoltDefaultSQLPort = 3306 + +// DoltDefaultRemotesAPIPort is the default remotesapi port for dolt server +const DoltDefaultRemotesAPIPort = 50051 + +// ErrDoltRequiresCGO is returned when dolt features are requested without CGO +var ErrDoltRequiresCGO = errors.New("dolt backend requires CGO; use pre-built binaries from GitHub releases or enable CGO") + +// StartDoltServer returns an error in non-CGO builds +func StartDoltServer(ctx context.Context, dataDir, logFile string, sqlPort, remotePort int) (*DoltServerHandle, error) { + return nil, ErrDoltRequiresCGO +} + +// Stop is a no-op stub +func (h *DoltServerHandle) Stop() error { + return nil +} + +// SQLPort returns 0 in non-CGO builds +func (h *DoltServerHandle) SQLPort() int { + return 0 +} + +// RemotesAPIPort returns 0 in non-CGO builds +func (h *DoltServerHandle) RemotesAPIPort() int { + return 0 +} + +// Host returns empty string in non-CGO builds +func (h *DoltServerHandle) Host() string { + return "" +} + +// DoltServerAvailable returns false when CGO is not available +func DoltServerAvailable() bool { + return false +} + + diff --git a/cmd/bd/dolt_singleprocess_test.go b/cmd/bd/dolt_singleprocess_test.go new file mode 100644 index 000000000..057264177 --- /dev/null +++ b/cmd/bd/dolt_singleprocess_test.go @@ -0,0 +1,135 @@ +package main + +import ( + "os" + "os/exec" + "path/filepath" + "strings" + "testing" + "time" +) + +func writeDoltWorkspace(t *testing.T, workspaceDir string) (beadsDir string, doltDir string) { + t.Helper() + beadsDir = filepath.Join(workspaceDir, ".beads") + doltDir = filepath.Join(beadsDir, "dolt") + if err := os.MkdirAll(doltDir, 0o700); err != nil { + t.Fatalf("mkdir: %v", err) + } + + metadata := `{ + "database": "dolt", + "backend": "dolt" +}` + if err := os.WriteFile(filepath.Join(beadsDir, "metadata.json"), []byte(metadata), 0o600); err != nil { + t.Fatalf("write metadata.json: %v", err) + } + return beadsDir, doltDir +} + +func TestDoltSingleProcess_ShouldAutoStartDaemonFalse(t *testing.T) { + oldDBPath := dbPath + t.Cleanup(func() { dbPath = oldDBPath }) + dbPath = "" + + ws := t.TempDir() + beadsDir, _ := writeDoltWorkspace(t, ws) + + t.Setenv("BEADS_DIR", beadsDir) + // Ensure the finder sees a workspace root (and not the repo running tests). + oldWD, _ := os.Getwd() + _ = os.Chdir(ws) + t.Cleanup(func() { _ = os.Chdir(oldWD) }) + + if shouldAutoStartDaemon() { + t.Fatalf("expected shouldAutoStartDaemon() to be false for dolt backend") + } +} + +func TestDoltSingleProcess_TryAutoStartDoesNotCreateStartlock(t *testing.T) { + oldDBPath := dbPath + t.Cleanup(func() { dbPath = oldDBPath }) + dbPath = "" + + ws := t.TempDir() + beadsDir, _ := writeDoltWorkspace(t, ws) + t.Setenv("BEADS_DIR", beadsDir) + + socketPath := filepath.Join(ws, "bd.sock") + lockPath := socketPath + ".startlock" + + ok := tryAutoStartDaemon(socketPath) + if ok { + t.Fatalf("expected tryAutoStartDaemon() to return false for dolt backend") + } + if _, err := os.Stat(lockPath); err == nil { + t.Fatalf("expected startlock not to be created for dolt backend: %s", lockPath) + } else if !os.IsNotExist(err) { + t.Fatalf("stat startlock: %v", err) + } +} + +func TestDoltSingleProcess_DaemonGuardBlocksStartCommand(t *testing.T) { + oldDBPath := dbPath + t.Cleanup(func() { dbPath = oldDBPath }) + dbPath = "" + + ws := t.TempDir() + beadsDir, _ := writeDoltWorkspace(t, ws) + t.Setenv("BEADS_DIR", beadsDir) + + // Use daemonStartCmd which has the guard attached. + // Ensure help and federation flags exist (cobra adds them during execution). + cmd := daemonStartCmd + cmd.Flags().Bool("help", false, "help") + // Note: federation flag is already registered in init() + err := guardDaemonStartForDolt(cmd, nil) + if err == nil { + t.Fatalf("expected daemon guard error for dolt backend without --federation") + } + // Guardrail wording may evolve; assert a stable intent. + if !strings.Contains(err.Error(), "daemon mode is not supported") { + t.Fatalf("expected error to mention daemon mode unsupported, got: %v", err) + } +} + +// This test uses a helper subprocess because startDaemon calls os.Exit on failure. +func TestDoltSingleProcess_StartDaemonGuardrailExitsNonZero(t *testing.T) { + if os.Getenv("BD_TEST_HELPER_STARTDAEMON") == "1" { + // Helper mode: set up environment and invoke startDaemon (should os.Exit(1)). + ws := os.Getenv("BD_TEST_WORKSPACE") + _, doltDir := writeDoltWorkspace(t, ws) + // Ensure FindDatabasePath can resolve. + _ = os.Chdir(ws) + _ = os.Setenv("BEADS_DB", doltDir) + dbPath = "" + + pidFile := filepath.Join(ws, ".beads", "daemon.pid") + startDaemon(5*time.Second, false, false, false, false, false, "", pidFile, "info", false, false, 0, 0) + return + } + + ws := t.TempDir() + // Pre-create workspace structure so helper can just use it. + _, doltDir := writeDoltWorkspace(t, ws) + + exe, err := os.Executable() + if err != nil { + t.Fatalf("os.Executable: %v", err) + } + + cmd := exec.Command(exe, "-test.run", "^TestDoltSingleProcess_StartDaemonGuardrailExitsNonZero$", "-test.v") + cmd.Env = append(os.Environ(), + "BD_TEST_HELPER_STARTDAEMON=1", + "BD_TEST_WORKSPACE="+ws, + "BEADS_DB="+doltDir, + ) + out, err := cmd.CombinedOutput() + if err == nil { + t.Fatalf("expected non-zero exit; output:\n%s", string(out)) + } + if !strings.Contains(string(out), "daemon mode is not supported") { + t.Fatalf("expected output to mention daemon unsupported; got:\n%s", string(out)) + } +} + diff --git a/cmd/bd/federation.go b/cmd/bd/federation.go index 00a370b96..80effbcda 100644 --- a/cmd/bd/federation.go +++ b/cmd/bd/federation.go @@ -1,3 +1,4 @@ +//go:build cgo package main import ( diff --git a/cmd/bd/federation_nocgo.go b/cmd/bd/federation_nocgo.go new file mode 100644 index 000000000..9a77ca769 --- /dev/null +++ b/cmd/bd/federation_nocgo.go @@ -0,0 +1,35 @@ +//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) +} + + diff --git a/cmd/bd/init.go b/cmd/bd/init.go index e1d5afede..8889f17d5 100644 --- a/cmd/bd/init.go +++ b/cmd/bd/init.go @@ -753,8 +753,8 @@ func init() { initCmd.Flags().Bool("force", false, "Force re-initialization even if JSONL already has issues (may cause data loss)") initCmd.Flags().Bool("from-jsonl", false, "Import from current .beads/issues.jsonl file instead of git history (preserves manual cleanups)") - // Dolt server mode flags - initCmd.Flags().Bool("server", false, "Configure Dolt server connection settings (server mode is always used)") + // Dolt server mode flags (bd-dolt.2.2) + initCmd.Flags().Bool("server", false, "Explicitly configure Dolt in server mode for high-concurrency (default: embedded)") initCmd.Flags().String("server-host", "", "Dolt server host (default: 127.0.0.1)") initCmd.Flags().Int("server-port", 0, "Dolt server port (default: 3307)") initCmd.Flags().String("server-user", "", "Dolt server MySQL user (default: root)") diff --git a/cmd/bd/main.go b/cmd/bd/main.go index b7830e975..33fb4956f 100644 --- a/cmd/bd/main.go +++ b/cmd/bd/main.go @@ -641,6 +641,17 @@ var rootCmd = &cobra.Command{ debug.Logf("wisp operation detected, using direct mode") } + // Embedded Dolt is single-process-only; never use daemon/RPC. + // (Dolt server mode supports multi-process and won't trigger this.) + // This must be checked after dbPath is resolved. + if !noDaemon && singleProcessOnlyBackend() { + noDaemon = true + daemonStatus.AutoStartEnabled = false + daemonStatus.FallbackReason = FallbackSingleProcessOnly + daemonStatus.Detail = "backend is single-process-only (embedded dolt): daemon mode disabled; using direct mode" + debug.Logf("single-process backend detected, using direct mode") + } + // Try to connect to daemon first (unless --no-daemon flag is set or worktree safety check fails) if noDaemon { // Only set FallbackFlagNoDaemon if not already set by auto-bypass logic @@ -843,12 +854,22 @@ var rootCmd = &cobra.Command{ } if backend == configfile.BackendDolt { + // Set advisory lock timeout for dolt embedded mode. + // Reads get a shorter timeout (shared lock, less contention expected). + // Writes get a longer timeout (exclusive lock, may need to wait for readers). + if useReadOnly { + opts.OpenTimeout = 5 * time.Second + } else { + opts.OpenTimeout = 15 * time.Second + } + // For Dolt, use the dolt subdirectory doltPath := filepath.Join(beadsDir, "dolt") - // Load server connection config from metadata.json + // Check if server mode is configured in metadata.json cfg, cfgErr := configfile.Load(beadsDir) - if cfgErr == nil && cfg != nil { + if cfgErr == nil && cfg != nil && cfg.IsDoltServerMode() { + opts.ServerMode = true opts.ServerHost = cfg.GetDoltServerHost() opts.ServerPort = cfg.GetDoltServerPort() if cfg.Database != "" { diff --git a/cmd/bd/migrate_dolt.go b/cmd/bd/migrate_dolt.go index 3781dae6a..9a10b7f7f 100644 --- a/cmd/bd/migrate_dolt.go +++ b/cmd/bd/migrate_dolt.go @@ -1,3 +1,4 @@ +//go:build cgo package main import ( diff --git a/cmd/bd/migrate_dolt_cmd.go b/cmd/bd/migrate_dolt_cmd.go index 66789243a..71e1762b6 100644 --- a/cmd/bd/migrate_dolt_cmd.go +++ b/cmd/bd/migrate_dolt_cmd.go @@ -1,3 +1,5 @@ +//go:build cgo + package main import ( diff --git a/cmd/bd/migrate_dolt_cmd_nocgo.go b/cmd/bd/migrate_dolt_cmd_nocgo.go new file mode 100644 index 000000000..0ae59aad9 --- /dev/null +++ b/cmd/bd/migrate_dolt_cmd_nocgo.go @@ -0,0 +1,35 @@ +//go:build !cgo + +package main + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" +) + +var migrateDoltCmd = &cobra.Command{ + Use: "dolt", + Short: "Migrate from SQLite to Dolt backend", + Long: `Migrate the current beads installation from SQLite to Dolt backend. (Requires CGO)`, + Run: func(cmd *cobra.Command, args []string) { + if jsonOutput { + outputJSON(map[string]interface{}{ + "error": "dolt_not_available", + "message": "Dolt backend requires CGO. This binary was built without CGO support.", + }) + } else { + fmt.Fprintf(os.Stderr, "Error: Dolt backend requires CGO\n") + fmt.Fprintf(os.Stderr, "This binary was built without CGO support.\n") + fmt.Fprintf(os.Stderr, "To use Dolt, rebuild with: CGO_ENABLED=1 go build\n") + } + os.Exit(1) + }, +} + +func init() { + migrateDoltCmd.Flags().Bool("dry-run", false, "Preview migration without making changes") + migrateDoltCmd.Flags().BoolP("yes", "y", false, "Skip confirmation prompt (for automation)") + migrateCmd.AddCommand(migrateDoltCmd) +} diff --git a/cmd/bd/migrate_dolt_nocgo.go b/cmd/bd/migrate_dolt_nocgo.go new file mode 100644 index 000000000..d39ed3620 --- /dev/null +++ b/cmd/bd/migrate_dolt_nocgo.go @@ -0,0 +1,41 @@ +//go:build !cgo +package main + +import ( + "fmt" + "os" +) + +// handleToDoltMigration is a stub for non-cgo builds. +// Dolt requires CGO, so this migration is not available. +func handleToDoltMigration(dryRun bool, autoYes bool) { + if jsonOutput { + outputJSON(map[string]interface{}{ + "error": "dolt_not_available", + "message": "Dolt backend requires CGO. This binary was built without CGO support.", + }) + } else { + fmt.Fprintf(os.Stderr, "Error: Dolt backend requires CGO\n") + fmt.Fprintf(os.Stderr, "This binary was built without CGO support.\n") + fmt.Fprintf(os.Stderr, "To use Dolt, rebuild with: CGO_ENABLED=1 go build\n") + } + os.Exit(1) +} + +// handleToSQLiteMigration is a stub for non-cgo builds. +// Dolt requires CGO, so this migration from Dolt is not available. +func handleToSQLiteMigration(dryRun bool, autoYes bool) { + if jsonOutput { + outputJSON(map[string]interface{}{ + "error": "dolt_not_available", + "message": "Dolt backend requires CGO. This binary was built without CGO support.", + }) + } else { + fmt.Fprintf(os.Stderr, "Error: Dolt backend requires CGO\n") + fmt.Fprintf(os.Stderr, "This binary was built without CGO support.\n") + fmt.Fprintf(os.Stderr, "To use Dolt, rebuild with: CGO_ENABLED=1 go build\n") + } + os.Exit(1) +} + + diff --git a/cmd/bd/sync_import.go b/cmd/bd/sync_import.go index 05e84a89c..9ef4ad753 100644 --- a/cmd/bd/sync_import.go +++ b/cmd/bd/sync_import.go @@ -34,7 +34,7 @@ func importFromJSONL(ctx context.Context, jsonlPath string, renameOnImport bool, protectLeftSnapshot = opts[1] } - // Guardrail: single-process backends must not spawn a helper `bd import` + // Guardrail: single-process backends (e.g., Dolt) must not spawn a helper `bd import` // process while the parent holds an open store. Use inline import instead. if singleProcessOnlyBackend() { return importFromJSONLInline(ctx, jsonlPath, renameOnImport, noGitHistory, protectLeftSnapshot) diff --git a/docs/INSTALLING.md b/docs/INSTALLING.md index f6c0d329e..21d61395f 100644 --- a/docs/INSTALLING.md +++ b/docs/INSTALLING.md @@ -71,6 +71,31 @@ The installer will: **TL;DR:** Use Homebrew if available. Use npm if you're in a Node.js environment. Use the script for quick one-off installs or CI. +## Build Dependencies (go install / from source) + +If you install via `go install` or build from source, you need system dependencies for CGO: + +macOS (Homebrew): +```bash +brew install icu4c zstd +``` + +Linux (Debian/Ubuntu): +```bash +sudo apt-get install -y libicu-dev libzstd-dev +``` + +Linux (Fedora/RHEL): +```bash +sudo dnf install -y libicu-devel libzstd-devel +``` + +If you see `unicode/uregex.h` missing on macOS, `icu4c` is keg-only. Use: +```bash +ICU_PREFIX="$(brew --prefix icu4c)" +CGO_CFLAGS="-I${ICU_PREFIX}/include" CGO_CPPFLAGS="-I${ICU_PREFIX}/include" CGO_LDFLAGS="-L${ICU_PREFIX}/lib" go install github.com/steveyegge/beads/cmd/bd@latest +``` + ## Platform-Specific Installation ### macOS @@ -150,13 +175,15 @@ irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex The script installs a prebuilt Windows release if available. Go is only required for `go install` or building from source. -**Dolt backend on Windows:** Supported. Connects to dolt sql-server via MySQL protocol. +**Dolt backend on Windows:** Supported via pure-Go regex backend. Windows builds automatically use Go's stdlib `regexp` instead of ICU regex to avoid CGO/header dependencies. If you need full ICU regex semantics, use Linux/macOS (or WSL) with ICU installed. **Via go install**: ```pwsh go install github.com/steveyegge/beads/cmd/bd@latest ``` +The installer automatically applies the pure-Go regex backend on Windows. + **From source**: ```pwsh git clone https://github.com/steveyegge/beads @@ -165,6 +192,8 @@ go build -o bd.exe ./cmd/bd Move-Item bd.exe $env:USERPROFILE\AppData\Local\Microsoft\WindowsApps\ ``` +The build automatically applies the pure-Go regex backend on Windows via the `gms_pure_go` build tag. If you see `unicode/uregex.h` missing while building, this is normal—the build will skip it on Windows. + **Verify installation**: ```pwsh bd version @@ -355,20 +384,21 @@ go install github.com/steveyegge/beads/cmd/bd@latest ### `zsh: killed bd` or crashes on macOS -Some users report crashes when running `bd init` or other commands on macOS. Try reinstalling: +Some users report crashes when running `bd init` or other commands on macOS. This is typically caused by CGO/SQLite compatibility issues. +**Workaround:** ```bash -# Via Homebrew (recommended) -brew reinstall beads +# Build with CGO enabled +CGO_ENABLED=1 go install github.com/steveyegge/beads/cmd/bd@latest -# Or rebuild from source +# Or if building from source git clone https://github.com/steveyegge/beads cd beads -go build -o bd ./cmd/bd +CGO_ENABLED=1 go build -o bd ./cmd/bd sudo mv bd /usr/local/bin/ ``` -If you're still seeing crashes, please [file an issue](https://github.com/steveyegge/beads/issues). +If you installed via Homebrew, this shouldn't be necessary as the formula already enables CGO. If you're still seeing crashes with the Homebrew version, please [file an issue](https://github.com/steveyegge/beads/issues). ### Claude Code Plugin: MCP server fails to start diff --git a/go.mod b/go.mod index dc04bbcc8..d20b446e0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/steveyegge/beads -go 1.25.5 +go 1.25.6 require ( github.com/BurntSushi/toml v1.6.0 @@ -9,6 +9,7 @@ require ( github.com/charmbracelet/glamour v0.10.0 github.com/charmbracelet/huh v0.8.0 github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 + github.com/dolthub/driver v0.2.1-0.20260129210815-dc59f6dbac23 github.com/fsnotify/fsnotify v1.9.0 github.com/go-sql-driver/mysql v1.9.3 github.com/gofrs/flock v0.13.0 @@ -26,14 +27,54 @@ require ( rsc.io/script v0.0.2 ) +replace github.com/dolthub/go-icu-regex => ./internal/third_party/go-icu-regex + require ( + cel.dev/expr v0.24.0 // indirect + cloud.google.com/go v0.120.0 // indirect + cloud.google.com/go/auth v0.16.2 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute/metadata v0.7.0 // indirect + cloud.google.com/go/iam v1.5.2 // indirect + cloud.google.com/go/monitoring v1.24.2 // indirect + cloud.google.com/go/storage v1.50.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/AlekSi/pointer v1.0.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0 // indirect + github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/alecthomas/chroma/v2 v2.14.0 // indirect + github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible // indirect + github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect + github.com/apache/thrift v0.19.0 // indirect github.com/atotto/clipboard v0.1.4 // indirect + github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect + github.com/aws/aws-sdk-go-v2/config v1.29.8 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.61 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.64 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect + github.com/aws/aws-sdk-go-v2/service/dynamodb v1.41.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.15 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.78.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.25.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.16 // indirect + github.com/aws/smithy-go v1.22.2 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect + github.com/bcicen/jstream v1.0.1 // indirect github.com/catppuccin/go v0.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 // indirect github.com/charmbracelet/bubbletea v1.3.6 // indirect github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect @@ -42,44 +83,121 @@ require ( github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect + github.com/denisbrodbeck/machineid v1.0.1 // indirect github.com/dlclark/regexp2 v1.11.0 // indirect + github.com/dolthub/aws-sdk-go-ini-parser v0.0.0-20250305001723-2821c37f6c12 // indirect + github.com/dolthub/dolt/go v0.40.5-0.20260129204643-460dc5864c05 // indirect + github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca // indirect + github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 // indirect + github.com/dolthub/fslock v0.0.3 // indirect + github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 // indirect + github.com/dolthub/go-mysql-server v0.20.1-0.20260128201837-5b7ec92cc6e9 // indirect + github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 // indirect + github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 // indirect + github.com/dolthub/vitess v0.0.0-20260128180459-bd171d35a7e2 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/edsrzf/mmap-go v1.2.0 // indirect + github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect + github.com/esote/minmaxheap v1.0.0 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-jose/go-jose/v4 v4.0.5 // indirect + github.com/go-logr/logr v1.4.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect - github.com/google/go-cmp v0.7.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/gocraft/dbr/v2 v2.7.6 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.1.2 // indirect + github.com/google/s2a-go v0.1.9 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect + github.com/googleapis/gax-go/v2 v2.14.2 // indirect github.com/gorilla/css v1.0.1 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/juju/gnuflag v1.0.0 // indirect + github.com/kch42/buzhash v0.0.0-20160816060738-9bdec3dec7c6 // indirect + github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/cpuid/v2 v2.2.6 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/lestrrat-go/strftime v1.0.6 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/microcosm-cc/bluemonday v1.0.27 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect + github.com/mohae/uvarint v0.0.0-20160208145430-c3f9e62bf2b0 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/ncruces/julianday v1.0.0 // indirect + github.com/oracle/oci-go-sdk/v65 v65.55.0 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect + github.com/sergi/go-diff v1.3.1 // indirect + github.com/shopspring/decimal v1.4.0 // indirect + github.com/silvasur/buzhash v0.0.0-20160816060738-9bdec3dec7c6 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/sony/gobreaker v0.5.0 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 // indirect + github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/tidwall/sjson v1.2.5 // indirect + github.com/vbauerster/mpb/v8 v8.7.2 // indirect + github.com/xitongsys/parquet-go v1.6.2 // indirect + github.com/xitongsys/parquet-go-source v0.0.0-20240122235623-d6294584ab18 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect github.com/yuin/goldmark v1.7.8 // indirect github.com/yuin/goldmark-emoji v1.0.5 // indirect + github.com/zeebo/errs v1.4.0 // indirect + github.com/zeebo/xxh3 v1.0.2 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect + go.opentelemetry.io/otel v1.36.0 // indirect + go.opentelemetry.io/otel/metric v1.36.0 // indirect + go.opentelemetry.io/otel/sdk v1.36.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect + go.opentelemetry.io/otel/trace v1.36.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/crypto v0.47.0 // indirect golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect golang.org/x/net v0.48.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect golang.org/x/sync v0.19.0 // indirect + golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc // indirect golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.12.0 // indirect golang.org/x/tools v0.40.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + google.golang.org/api v0.241.0 // indirect + google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 // indirect + google.golang.org/grpc v1.74.2 // indirect + google.golang.org/protobuf v1.36.8 // indirect + gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect + gopkg.in/src-d/go-errors.v1 v1.0.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 0dd128dfb..7b30ff32c 100644 --- a/go.sum +++ b/go.sum @@ -1,31 +1,303 @@ +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.82.0/go.mod h1:vlKccHJGuFBFufnAnuB08dfEH9Y3H7dzDzRECFdC2TA= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.120.0 h1:wc6bgG9DHyKqF5/vQvX1CiZrtHnxJjBlKUyF9nP6meA= +cloud.google.com/go v0.120.0/go.mod h1:/beW32s8/pGRuj4IILWQNd4uuebeT4dkOhKmkfit64Q= +cloud.google.com/go/auth v0.16.2 h1:QvBAGFPLrDeoiNjyfVunhQ10HKNYuOwZ5noee0M5df4= +cloud.google.com/go/auth v0.16.2/go.mod h1:sRBas2Y1fB1vZTdurouM0AzuYQBMZinrUYL8EufhtEA= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.2.0/go.mod h1:xlogom/6gr8RJGBe7nT2eGsQYAFUbbv8dbC29qE3Xmw= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute/metadata v0.7.0 h1:PBWF+iiAerVNe8UCHxdOt6eHLVc3ydFeOCw78U8ytSU= +cloud.google.com/go/compute/metadata v0.7.0/go.mod h1:j5MvL9PprKL39t166CoB1uVHfQMs4tFQZZcKwksXUjo= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= +cloud.google.com/go/iam v0.1.1/go.mod h1:CKqrcnI/suGpybEHxZ7BMehL0oA4LpdyJdUlTl9jVMw= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= +cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= +cloud.google.com/go/kms v1.1.0/go.mod h1:WdbppnCDMDpOvoYBMn1+gNmOeEoZYqAv+HeuKARGCXI= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= +cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc= +cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhXT62TuXALA= +cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= +cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= +cloud.google.com/go/monitoring v1.1.0/go.mod h1:L81pzz7HKn14QCMaCs6NTQkdBnE87TElyanS95vIcl4= +cloud.google.com/go/monitoring v1.4.0/go.mod h1:y6xnxfwI3hTFWOdkOaD7nfJVlwuC3/mS/5kvtT131p4= +cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM= +cloud.google.com/go/monitoring v1.24.2/go.mod h1:x7yzPWcgDRnPEv3sI+jJGBkwl5qINf+6qY4eq0I9B4U= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.19.0/go.mod h1:/O9kmSe9bb9KRnIAWkzmqhPjHo6LtzGOBYd/kr06XSs= +cloud.google.com/go/secretmanager v1.3.0/go.mod h1:+oLTkouyiYiabAQNugCeTS3PAArGiMJuBqvJnJsyH+U= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +cloud.google.com/go/storage v1.21.0/go.mod h1:XmRlxkgPjlBONznT2dDUU/5XlpU2OjMnKuqnZI01LAA= +cloud.google.com/go/storage v1.50.0 h1:3TbVkzTooBvnZsk7WaAQfOsNrdoM8QHusXA1cpk6QJs= +cloud.google.com/go/storage v1.50.0/go.mod h1:l7XeiD//vx5lfqE3RavfmU9yvk5Pp0Zhcv482poyafY= +cloud.google.com/go/trace v1.0.0/go.mod h1:4iErSByzxkyHWzzlAj63/Gmjz0NH1ASqhJguHpGcr6A= +cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQlbW1rwM= +cloud.google.com/go/trace v1.11.6 h1:2O2zjPzqPYAHrn3OKl029qlqG6W8ZdYaOWRyr8NgMT4= +cloud.google.com/go/trace v1.11.6/go.mod h1:GA855OeDEBiBMzcckLPE2kDunIpC72N+Pq8WFieFjnI= +contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= +contrib.go.opencensus.io/exporter/stackdriver v0.13.10/go.mod h1:I5htMbyta491eUxufwwZPQdcKvvgzMB4O9ni41YnIM8= +contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= +git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= +git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= github.com/AlekSi/pointer v1.0.0 h1:KWCWzsvFxNLcmM5XmiqHsGTTsuwZMsLFwWF9Y+//bNE= github.com/AlekSi/pointer v1.0.0/go.mod h1:1kjywbfcPFCmncIxtk6fIEub6LKrfMz3gc5QKVOSOA8= +github.com/Azure/azure-amqp-common-go/v3 v3.2.1/go.mod h1:O6X1iYHP7s2x7NjUKsXVhkwWrQhxrd+d8/3rRadj4CI= +github.com/Azure/azure-amqp-common-go/v3 v3.2.2/go.mod h1:O6X1iYHP7s2x7NjUKsXVhkwWrQhxrd+d8/3rRadj4CI= +github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k= +github.com/Azure/azure-sdk-for-go v51.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v59.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0/go.mod h1:ceIuwmxDWptoW3eCqSXlnPsZFKh4X+R38dWPv7GS9Vs= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.1.0/go.mod h1:7QJP7dr2wznCMeqIrhMgWGf7XpAQnVrJqDm9nvV3Cu4= +github.com/Azure/azure-service-bus-go v0.11.5/go.mod h1:MI6ge2CuQWBVq+ly456MY7XqNLJip5LO1iSFodbNLbU= +github.com/Azure/azure-storage-blob-go v0.14.0/go.mod h1:SMqIBi+SuiQH32bvyjngEewEeXoPfKMgWlBDaYf6fck= +github.com/Azure/go-amqp v0.16.0/go.mod h1:9YJ3RhxRT1gquYnzpZO1vcYMMpAdJT+QEg6fwmw9Zlg= +github.com/Azure/go-amqp v0.16.4/go.mod h1:9YJ3RhxRT1gquYnzpZO1vcYMMpAdJT+QEg6fwmw9Zlg= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.19/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= +github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.17/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= +github.com/Azure/go-autorest/autorest/azure/auth v0.5.9/go.mod h1:hg3/1yw0Bq87O3KvvnJoAh34/0zbP7SFizX/qN5JvjU= +github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= +github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= +github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/GoogleCloudPlatform/cloudsql-proxy v1.29.0/go.mod h1:spvB9eLJH9dutlbPSRmHvSXXHOwGRyeXh1jVdquA2G8= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0 h1:5IT7xOdq17MtcdtL/vtl6mGfzhaq4m4vpollPRmlsBQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.50.0/go.mod h1:ZV4VOm0/eHR06JLrXWe09068dHpr3TRpY9Uo7T+anuA= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.50.0 h1:nNMpRpnkWDAaqcpxMJvxa/Ud98gjbYwayJY4/9bdjiU= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.50.0/go.mod h1:SZiPHWGOOk3bl8tkevxkoiwPgsIl6CwrWcbwjfHZpdM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0 h1:ig/FpDD2JofP/NExKQUbn7uOSZzJAQqogfqluZK4ed4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.50.0/go.mod h1:otE2jQekW/PqXk1Awf5lmfokJx4uwuqcj1ab5SpGeW0= +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/toxiproxy/v2 v2.5.0 h1:i4LPT+qrSlKNtQf5QliVjdP08GyAH8+BUIc9gT0eahc= +github.com/Shopify/toxiproxy/v2 v2.5.0/go.mod h1:yhM2epWtAmel9CB8r2+L+PCmhH6yH2pITaPAo7jxJl0= +github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db h1:CjPUSXOiYptLbTdr1RceuZgSFDQ7U15ITERUGrUORx8= +github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db/go.mod h1:rB3B4rKii8V21ydCbIzH5hZiCQE7f5E9SzUb/ZZx530= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw= +github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE= github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E= github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible h1:8psS8a+wKfiLt1iVDX79F7Y6wUM49Lcha2FMXt4UM8g= +github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/anthropics/anthropic-sdk-go v1.20.0 h1:KE6gQiAT1aBHMh3Dmp1WgqnyZZLJNo2oX3ka004oDLE= github.com/anthropics/anthropic-sdk-go v1.20.0/go.mod h1:WTz31rIUHUHqai2UslPpw5CwXrQP3geYBioRV4WOLvE= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apache/arrow/go/arrow v0.0.0-20200730104253-651201b0f516/go.mod h1:QNYViu/X0HXDHw7m3KXzWSVXIbfUvJqBFe6Gj8/pYA0= +github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 h1:q4dksr6ICHXqG5hm0ZW5IHyeEJXoIJSOZeBLmWPNeIQ= +github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40/go.mod h1:Q7yQnSMnLvcXlZ8RV+jwz/6y1rQTqbX6C82SndT52Zs= +github.com/apache/thrift v0.0.0-20181112125854-24918abba929/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.14.2/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= +github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= +github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.30.19/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.43.31/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go-v2 v1.16.2/go.mod h1:ytwTPBG6fXTZLxxeeCCWj2/EMYp/xDUgX+OET6TLNNU= +github.com/aws/aws-sdk-go-v2 v1.23.0/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= +github.com/aws/aws-sdk-go-v2 v1.36.3 h1:mJoei2CxPutQVxaATCzDUjcZEjVRdpsiiXi2o38yqWM= +github.com/aws/aws-sdk-go-v2 v1.36.3/go.mod h1:LLXuLpgzEbD766Z5ECcRmi8AzSwfZItDtmABVkRLGzg= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.1/go.mod h1:n8Bs1ElDD2wJ9kCRTczA83gYbBmjSwZp3umc6zF4EeM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= +github.com/aws/aws-sdk-go-v2/config v1.15.3/go.mod h1:9YL3v07Xc/ohTsxFXzan9ZpFpdTOFl4X65BAKYaz8jg= +github.com/aws/aws-sdk-go-v2/config v1.25.3/go.mod h1:tAByZy03nH5jcq0vZmkcVoo6tRzRHEwSFx3QW4NmDw8= +github.com/aws/aws-sdk-go-v2/config v1.29.8 h1:RpwAfYcV2lr/yRc4lWhUM9JRPQqKgKWmou3LV7UfWP4= +github.com/aws/aws-sdk-go-v2/config v1.29.8/go.mod h1:t+G7Fq1OcO8cXTPPXzxQSnj/5Xzdc9jAAD3Xrn9/Mgo= +github.com/aws/aws-sdk-go-v2/credentials v1.11.2/go.mod h1:j8YsY9TXTm31k4eFhspiQicfXPLZ0gYXA50i4gxPE8g= +github.com/aws/aws-sdk-go-v2/credentials v1.16.2/go.mod h1:sDdvGhXrSVT5yzBDR7qXz+rhbpiMpUYfF3vJ01QSdrc= +github.com/aws/aws-sdk-go-v2/credentials v1.17.61 h1:Hd/uX6Wo2iUW1JWII+rmyCD7MMhOe7ALwQXN6sKDd1o= +github.com/aws/aws-sdk-go-v2/credentials v1.17.61/go.mod h1:L7vaLkwHY1qgW0gG1zG0z/X0sQ5tpIY5iI13+j3qI80= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.3/go.mod h1:uk1vhHHERfSVCUnqSqz8O48LBYDSC+k6brng09jcMOk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.4/go.mod h1:t4i+yGHMCcUNIX1x7YVYa6bH/Do7civ5I6cG/6PMfyA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.3/go.mod h1:0dHuD2HZZSiwfJSy1FO5bX1hQ1TxVV1QXXjpn3XUE44= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.0/go.mod h1:UcgIwJ9KHquYxs6Q5skC9qXjhYMK+JASDYcXQ4X7JZE= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.64 h1:RTko0AQ0i1vWXDM97DkuW6zskgOxFxm4RqC0kmBJFkE= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.64/go.mod h1:ty968MpOa5CoQ/ALWNB8Gmfoehof2nRHDR/DZDPfimE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.9/go.mod h1:AnVH5pvai0pAF4lXRq0bmhbes1u9R8wTE+g+183bZNM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.3/go.mod h1:7sGSz1JCKHWWBHq98m6sMtWQikmYPpxjqOydDemiVoM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 h1:ZK5jHhnrioRkUNOc+hOgQKlUL5JeC3S6JgLxtQ+Rm0Q= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34/go.mod h1:p4VfIceZokChbA9FzMbRGz5OV+lekcVtHlPKEO0gSZY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.3/go.mod h1:ssOhaLpRlh88H3UmEcsBoVKq309quMvm3Ds8e9d4eJM= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.3/go.mod h1:ify42Rb7nKeDDPkFjKn7q1bPscVPu/+gmHH8d2c+anU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0ioo/gq8Mn6u9w19Mri8DnJ15Jf0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.10/go.mod h1:8DcYQcz0+ZJaSxANlHIsbbi6S+zMwjwdDqwW3r9AzaE= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.3/go.mod h1:5yzAuE9i2RkVAttBl8yxZgQr5OCq4D5yDnG7j9x2L0U= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcuz+RjeziUtNJackkM= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.41.0 h1:kSMAk72LZ5eIdY/W+tVV6VdokciajcDdVClEBVNWNP0= +github.com/aws/aws-sdk-go-v2/service/dynamodb v1.41.0/go.mod h1:yYaWRnVSPyAmexW5t7G3TcuYoalYfT+xQwzWsvtUQ7M= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.1/go.mod h1:GeUru+8VzrTXV/83XyMJ80KpH8xO89VPoUileyNQ+tc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.3/go.mod h1:Seb8KNmD6kVTjwRjVEgOT5hPin6sq+v4C2ycJQDwuH8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.3/go.mod h1:R+/S1O4TYpcktbVwddeOYg+uwUfLhADP2S/x4QwsCTM= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.6.2 h1:t/gZFyrijKuSU0elA5kRngP/oU3mc0I+Dvp8HwRE4c0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.6.2/go.mod h1:iu6FSzgt+M2/x3Dk8zhycdIcHjEFb36IS8HVUVFoMg0= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.15 h1:M1R1rud7HzDrfCdlBQ7NjnRsDNEhXO/vGhuD189Ggmk= +github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.15/go.mod h1:uvFKBSq9yMPV4LGAi7N4awn4tLY+hKE35f8THes2mzQ= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.3/go.mod h1:wlY6SVjuwvh3TVRpTqdy4I1JpBFLX4UGeKZdWntaocw= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.3/go.mod h1:Owv1I59vaghv1Ax8zz8ELY8DN7/Y0rGS+WWAmjgi950= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.3/go.mod h1:Bm/v2IaN6rZ+Op7zX+bOUMdL4fsrYZiD0dsjLhNKwZc= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.3/go.mod h1:KZgs2ny8HsxRIRbDwgvJcHHBZPOzQr/+NtGwnP+w2ec= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 h1:moLQUoVq91LiqT1nbvzDukyqAlCv89ZmwaHw/ZFlFZg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15/go.mod h1:ZH34PJUc8ApjBIfgQCFvkWcUDBtl/WTD+uiYHjd8igA= +github.com/aws/aws-sdk-go-v2/service/kms v1.16.3/go.mod h1:QuiHPBqlOFCi4LqdSskYYAWpQlx3PKmohy+rE2F+o5g= +github.com/aws/aws-sdk-go-v2/service/s3 v1.26.3/go.mod h1:g1qvDuRsJY+XghsV6zg00Z4KJ7DtFFCx8fJD2a491Ak= +github.com/aws/aws-sdk-go-v2/service/s3 v1.43.0/go.mod h1:NXRKkiRF+erX2hnybnVU660cYT5/KChRD4iUgJ97cI8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.78.0 h1:EBm8lXevBWe+kK9VOU/IBeOI189WPRwPUc3LvJK9GOs= +github.com/aws/aws-sdk-go-v2/service/s3 v1.78.0/go.mod h1:4qzsZSzB/KiX2EzDjs9D7A8rI/WGJxZceVJIHqtJjIU= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.4/go.mod h1:PJc8s+lxyU8rrre0/4a0pn2wgwiDvOEzoOjcJUBr67o= +github.com/aws/aws-sdk-go-v2/service/sns v1.17.4/go.mod h1:kElt+uCcXxcqFyc+bQqZPFD9DME/eC6oHBXvFzQ9Bcw= +github.com/aws/aws-sdk-go-v2/service/sqs v1.18.3/go.mod h1:skmQo0UPvsjsuYYSYMVmrPc1HWCbHUJyrCEp+ZaLzqM= +github.com/aws/aws-sdk-go-v2/service/ssm v1.24.1/go.mod h1:NR/xoKjdbRJ+qx0pMR4mI+N/H1I1ynHwXnO6FowXJc0= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.3/go.mod h1:7UQ/e69kU7LDPtY40OyoHYgRmgfGM4mgsLYtcObdveU= +github.com/aws/aws-sdk-go-v2/service/sso v1.17.2/go.mod h1:/pE21vno3q1h4bbhUOEi+6Zu/aT26UK2WKkDXd+TssQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.0 h1:2U9sF8nKy7UgyEeLiZTRg6ShBS22z8UnYpV6aRFL0is= +github.com/aws/aws-sdk-go-v2/service/sso v1.25.0/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.0/go.mod h1:dWqm5G767qwKPuayKfzm4rjzFmVjiBFbOJrpSPnAMDs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.0 h1:wjAdc85cXdQR5uLx5FwWvGIHm4OPJhTyzUHU8craXtE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.0/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= +github.com/aws/aws-sdk-go-v2/service/sts v1.16.3/go.mod h1:bfBj0iVmsUyUg4weDB4NxktD9rDGeKSVWnjTnwbx9b8= +github.com/aws/aws-sdk-go-v2/service/sts v1.25.3/go.mod h1:4EqRHDCKP78hq3zOnmFXu5k0j4bXbRFfCh/zQ6KnEfQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.16 h1:BHEK2Q/7CMRMCb3nySi/w8UbIcPhKvYP5s1xf8/izn0= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.16/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= +github.com/aws/smithy-go v1.11.2/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM= +github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= +github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY= github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/bcicen/jstream v1.0.1 h1:BXY7Cu4rdmc0rhyTVyT3UkxAiX3bnLpKLas9btbH5ck= +github.com/bcicen/jstream v1.0.1/go.mod h1:9ielPxqFry7Y4Tg3j4BfjPocfJ3TbsRtXOAYXYmRuAQ= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bobg/gcsobj v0.1.2/go.mod h1:vS49EQ1A1Ib8FgrL58C8xXYZyOCR2TgzAdopy6/ipa8= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY= github.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 h1:JFgG/xnwFfbezlUnFMJy0nusZvytYysV4SCS2cYbvws= github.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7/go.mod h1:ISC1gtLcVilLOf23wvTfoQuYbW2q0JevFxPfUzZ9Ybw= github.com/charmbracelet/bubbletea v1.3.6 h1:VkHIxPJQeDt0aFJIsVxw8BQdh/F/L2KKZGsK6et5taU= @@ -58,41 +330,426 @@ github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8 github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo= github.com/charmbracelet/x/xpty v0.1.2 h1:Pqmu4TEJ8KeA9uSkISKMU3f+C1F6OGBn8ABuGlqCbtI= github.com/charmbracelet/x/xpty v0.1.2/go.mod h1:XK2Z0id5rtLWcpeNiMYBccNNBrP2IJnzHI0Lq13Xzq4= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= +github.com/colinmarc/hdfs/v2 v2.1.1/go.mod h1:M3x+k8UKKmxtFu++uAZ0OtDU8jR3jnaZIAc6yK4Ue0c= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisbrodbeck/machineid v1.0.1 h1:geKr9qtkB876mXguW2X6TU4ZynleN6ezuMSRhl4D7AQ= +github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbjJCrnectwCyxcUSI= +github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= +github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= +github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= +github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/dolthub/aws-sdk-go-ini-parser v0.0.0-20250305001723-2821c37f6c12 h1:IdqX7J8vi/Kn3T3Ee0VzqnLqwFmgA2hr8WZETPcQjfM= +github.com/dolthub/aws-sdk-go-ini-parser v0.0.0-20250305001723-2821c37f6c12/go.mod h1:rN7X8BHwkjPcfMQQ2QTAq/xM3leUSGLfb+1Js7Y6TVo= +github.com/dolthub/dolt-mcp v0.2.2 h1:bpROmam74n95uU4EA3BpOIVlTDT0pzeFMBwe/YRq2mI= +github.com/dolthub/dolt-mcp v0.2.2/go.mod h1:S++DJ4QWTAXq+0TNzFa7Oq3IhoT456DJHwAINFAHgDQ= +github.com/dolthub/dolt/go v0.40.5-0.20260129204643-460dc5864c05 h1:ZsAj+r1fYmbYqRrB0mDQfF3tANGpnZbkNHWHWYZJi88= +github.com/dolthub/dolt/go v0.40.5-0.20260129204643-460dc5864c05/go.mod h1:x6LyYipxhKsm8Cv6Rn1Y3qI1cOAMkutQdNSmNGpP1dk= +github.com/dolthub/driver v0.2.1-0.20260129210815-dc59f6dbac23 h1:h66vRV3/vrZqbP7W1a/I98j4WLUCS1ODMjYD5MMoAk4= +github.com/dolthub/driver v0.2.1-0.20260129210815-dc59f6dbac23/go.mod h1:oYgSs0OOPMM9/wYb5sNDIaMB6vVD5dm5/G0MMUQtEF4= +github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca h1:BGFz/0OlKIuC6qHIZQbvPapFvdAJkeEyGXWVgL5clmE= +github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca/go.mod h1:CoDLfgPqHyBtth0Cp+fi/CmC4R81zJNX4wPjShdZ+Bw= +github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 h1:u3PMzfF8RkKd3lB9pZ2bfn0qEG+1Gms9599cr0REMww= +github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2/go.mod h1:mIEZOHnFx4ZMQeawhw9rhsj+0zwQj7adVsnBX7t+eKY= +github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U= +github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0= +github.com/dolthub/go-mysql-server v0.20.1-0.20260128201837-5b7ec92cc6e9 h1:GjdX0PZCLTLfAqgH76EGt79UU4zldtg42G2qkB8m0/0= +github.com/dolthub/go-mysql-server v0.20.1-0.20260128201837-5b7ec92cc6e9/go.mod h1:wtNCSv7B5K71FddK7v79tjEqBL9BseKQ+1A6G/YdouU= +github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI= +github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q= +github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE= +github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718/go.mod h1:ehexgi1mPxRTk0Mok/pADALuHbvATulTh6gzr7NzZto= +github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 h1:bMGS25NWAGTEtT5tOBsCuCrlYnLRKpbJVJkDbrTRhwQ= +github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71/go.mod h1:2/2zjLQ/JOOSbbSboojeg+cAwcRV0fDLzIiWch/lhqI= +github.com/dolthub/vitess v0.0.0-20260128180459-bd171d35a7e2 h1:QMqgG+oegtoQxcHXk/EU5SznJaRPkRHsLpWOJDhGQPU= +github.com/dolthub/vitess v0.0.0-20260128180459-bd171d35a7e2/go.mod h1:eLLslh1CSPMf89pPcaMG4yM72PQbTN9OUYJeAy0fAis= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/ebitengine/purego v0.9.1 h1:a/k2f2HQU3Pi399RPW1MOaZyhKJL9w/xFpKAg4q1s0A= +github.com/ebitengine/purego v0.9.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/edsrzf/mmap-go v1.2.0 h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84= +github.com/edsrzf/mmap-go v1.2.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= +github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= +github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= +github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= +github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= +github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BMXYYRWTLOJKlh+lOBt6nUQgXAfB7oVIQt5cNreqSLI= +github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= +github.com/gin-gonic/gin v1.7.3/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/liberation v0.2.0 h1:jAkAWJP4S+OsrPLZM4/eC9iW7CtHy+HBXrEwZXWo5VM= +github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE= +github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 h1:6zl3BbBhdnMkpSj2YY30qV3gDcVBGtFgVsV3+/i+mKQ= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= +github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/gocraft/dbr/v2 v2.7.6 h1:ASHKFgCbTLODbb9f756Cl8VAlnvQLKqIzx9E1Cfb7eo= +github.com/gocraft/dbr/v2 v2.7.6/go.mod h1:8IH98S8M8J0JSEiYk0MPH26ZDUKemiQ/GvmXL5jo+Uw= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw= github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 h1:+eHOFJl1BaXrQxKX+T06f78590z4qA2ZzBTqahsKSE4= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/flatbuffers v2.0.0+incompatible h1:dicJ2oXwypfwUGnB2/TYWYEKiuk9eYQlQO/AnOHl5mI= +github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs= +github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/go-replayers/grpcreplay v1.1.0/go.mod h1:qzAvJ8/wi57zq7gWqaE6AwLM6miiXUQwP1S+I9icmhk= +github.com/google/go-replayers/httpreplay v1.1.1/go.mod h1:gN9GeLIs7l6NUoVaSSnv2RiqK1NiwAmD0MrKeC9IIks= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible h1:xmapqc1AyLoB+ddYT6r04bD9lIjlOqGaREovi0SzFaE= +github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210506205249-923b5ab0fc1a/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= +github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= +github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.14.2 h1:eBLnkZ9635krYIPD+ag1USrOAI0Nr0QYF3+/3GqO0k0= +github.com/googleapis/gax-go/v2 v2.14.2/go.mod h1:ON64QhlJkhVtSqp4v1uaK92VyZ2gmvDQsweuyLV+8+w= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= +github.com/hanwen/go-fuse/v2 v2.1.0/go.mod h1:oRyA5eK+pvJyv5otpO/DgccS8y/RvYMaO00GgRLGryc= +github.com/hashicorp/go-uuid v0.0.0-20180228145832-27454136f036/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= +github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= +github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= +github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= +github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= +github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgconn v1.11.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= +github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= +github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= +github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= +github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= +github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.2.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= +github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= +github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= +github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= +github.com/jackc/pgtype v1.10.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= +github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= +github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= +github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= +github.com/jackc/pgx/v4 v4.15.0/go.mod h1:D/zyOyXiaM1TmVWnOM18p0xdDtdakRBa0RsVGI3U3bw= +github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jcmturner/gofork v0.0.0-20180107083740-2aebee971930/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w= +github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/juju/gnuflag v1.0.0 h1:E6OmPEi2nqJYanlIw7a+bUF+FDiK3uSBHftRmQi3muQ= +github.com/juju/gnuflag v1.0.0/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/kch42/buzhash v0.0.0-20160816060738-9bdec3dec7c6 h1:l6Y3mFnF46A+CeZsTrT8kVIuhayq1266oxWpDKE7hnQ= +github.com/kch42/buzhash v0.0.0-20160816060738-9bdec3dec7c6/go.mod h1:UtDV9qK925GVmbdjR+e1unqoo+wGWNHHC6XB1Eu6wpE= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= +github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= +github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= +github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/mark3labs/mcp-go v0.34.0 h1:eWy7WBGvhk6EyAAyVzivTCprE52iXJwNtvHV6Cv3bR0= +github.com/mark3labs/mcp-go v0.34.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4= +github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= +github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= @@ -100,10 +757,27 @@ github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+Ei github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= +github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= +github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= +github.com/minio/minio-go/v7 v7.0.34/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/uvarint v0.0.0-20160208145430-c3f9e62bf2b0 h1:fXRYk7YXVIBMGAHT+GmAcbiXrudXMPtqdLfbkVfUhkI= +github.com/mohae/uvarint v0.0.0-20160208145430-c3f9e62bf2b0/go.mod h1:+6ZKJfAk1B0oKLOwdzYuRVJn3upG1c7uOm5Ih7Rrkvc= +github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= @@ -112,29 +786,92 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/ncruces/go-sqlite3 v0.30.5 h1:6usmTQ6khriL8oWilkAZSJM/AIpAlVL2zFrlcpDldCE= github.com/ncruces/go-sqlite3 v0.30.5/go.mod h1:0I0JFflTKzfs3Ogfv8erP7CCoV/Z8uxigVDNOR0AQ5E= github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= +github.com/ncw/swift v1.0.52/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/olebedev/when v1.1.0 h1:dlpoRa7huImhNtEx4yl0WYfTHVEWmJmIWd7fEkTHayc= github.com/olebedev/when v1.1.0/go.mod h1:T0THb4kP9D3NNqlvCwIG4GyUioTAzEhB4RNVzig/43E= +github.com/oracle/oci-go-sdk/v65 v65.55.0 h1:enKyHVLdJYDJrc9232w33u5F6t2p8Din4593kn3nh/w= +github.com/oracle/oci-go-sdk/v65 v65.55.0/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= +github.com/pborman/getopt v0.0.0-20180729010549-6fdd0a2c7117/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug= +github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= +github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= +github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= +github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= +github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/shirou/gopsutil/v4 v4.25.12 h1:e7PvW/0RmJ8p8vPGJH4jvNkOyLmbkXgXW4m6ZPic6CY= +github.com/shirou/gopsutil/v4 v4.25.12/go.mod h1:EivAfP5x2EhLp2ovdpKSozecVXn1TmuG7SMzs/Wh4PU= +github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= +github.com/silvasur/buzhash v0.0.0-20160816060738-9bdec3dec7c6 h1:31fhvQj+O9qDqMxUgQDOCQA5RV1iIFMzYPhBUyzg2p0= +github.com/silvasur/buzhash v0.0.0-20160816060738-9bdec3dec7c6/go.mod h1:jk5gVE20+MCoyJ2TFiiMrbWPyaH4t9T5F3HwVdthB2w= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA= +github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog= +github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg= +github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= @@ -146,10 +883,30 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= +github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= +github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE= +github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM= github.com/tetratelabs/wazero v1.11.0 h1:+gKemEuKCTevU4d7ZTzlsvgd1uaToIDtlQlmNbwqYhA= github.com/tetratelabs/wazero v1.11.0/go.mod h1:eV28rsN8Q+xwjogd7f4/Pp4xFxO7uOGbLcD/LzB1wiU= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -162,39 +919,712 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= +github.com/tklauser/go-sysconf v0.3.16 h1:frioLaCQSsF5Cy1jgRBrzr6t502KIIwQ0MArYICU0nA= +github.com/tklauser/go-sysconf v0.3.16/go.mod h1:/qNL9xxDhc7tx3HSRsLWNnuzbVfh3e7gh/BmM179nYI= +github.com/tklauser/numcpus v0.11.0 h1:nSTwhKH5e1dMNsCdVBukSZrURJRoHbSEQjdEbY+9RXw= +github.com/tklauser/numcpus v0.11.0/go.mod h1:z+LwcLq54uWZTX0u/bGobaV34u6V7KNlTZejzM6/3MQ= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/vbauerster/mpb/v8 v8.7.2 h1:SMJtxhNho1MV3OuFgS1DAzhANN1Ejc5Ct+0iSaIkB14= +github.com/vbauerster/mpb/v8 v8.7.2/go.mod h1:ZFnrjzspgDHoxYLGvxIruiNk73GNTPG4YHgVNpR10VY= +github.com/xitongsys/parquet-go v1.5.1/go.mod h1:xUxwM8ELydxh4edHGegYq1pA8NnMKDx0K/GyB0o2bww= +github.com/xitongsys/parquet-go v1.6.2 h1:MhCaXii4eqceKPu9BwrjLqyK10oX9WF+xGhwvwbw7xM= +github.com/xitongsys/parquet-go v1.6.2/go.mod h1:IulAQyalCm0rPiZVNnCgm/PCL64X2tdSVGMQ/UeKqWA= +github.com/xitongsys/parquet-go-source v0.0.0-20190524061010-2b72cbee77d5/go.mod h1:xxCx7Wpym/3QCo6JhujJX51dzSXrwmb0oH6FQb39SEA= +github.com/xitongsys/parquet-go-source v0.0.0-20200817004010-026bad9b25d0/go.mod h1:HYhIKsdns7xz80OgkbgJYrtQY7FjHWHKH6cvN7+czGE= +github.com/xitongsys/parquet-go-source v0.0.0-20240122235623-d6294584ab18 h1:Loknf8YcZNXiweAsfz8GD79m4WE0MSbf1Bl4YCAfFYQ= +github.com/xitongsys/parquet-go-source v0.0.0-20240122235623-d6294584ab18/go.mod h1:2ActxmJ4q17Cdruar9nKEkzKSOL1Ol03737Bkz10rTY= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= +github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic= github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark-emoji v1.0.5 h1:EMVWyCGPlXJfUXBXpuMu+ii3TIaxbVBnEX9uaDC4cIk= github.com/yuin/goldmark-emoji v1.0.5/go.mod h1:tTkZEbwu5wkPmgTcitqddVxY9osFZiavD+r4AzQrh1U= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg= +github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ= +github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= +github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= +github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= +github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/detectors/gcp v1.36.0 h1:F7q2tNlCaHY9nMKHR6XH9/qkp8FktLnIcy6jJNyOCQw= +go.opentelemetry.io/contrib/detectors/gcp v1.36.0/go.mod h1:IbBN8uAIIx734PTonTPxAxnjc2pQTxWNkwfstZ+6H2k= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= +go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0 h1:WDdP9acbMYjbKIyJUhTvtzj601sVJOqgWdUxSdR/Ysc= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.29.0/go.mod h1:BLbf7zbNIONBLPwvFnwNHGj4zge8uTCM/UPIVW1Mq2I= +go.opentelemetry.io/otel/metric v1.36.0 h1:MoWPKVhQvJ+eeXWHFBOPoBOi20jh6Iq2CcCREuTYufE= +go.opentelemetry.io/otel/metric v1.36.0/go.mod h1:zC7Ks+yeyJt4xig9DEw9kuUFe5C3zLbVjV2PzT6qzbs= +go.opentelemetry.io/otel/sdk v1.36.0 h1:b6SYIuLRs88ztox4EyrvRti80uXIFy+Sqzoh9kFULbs= +go.opentelemetry.io/otel/sdk v1.36.0/go.mod h1:+lC+mTgD+MUWfjJubi2vvXWcVxyr9rmlshZni72pXeY= +go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFwHX4dThiPis= +go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4= +go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= +go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +gocloud.dev v0.26.0/go.mod h1:mkUgejbnbLotorqDyvedJO20XcZNTynmSeVSQS9btVg= +golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= +golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo= golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= +golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220401154927-543a649e0bdd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220330033206-e17cdc41300f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc h1:bH6xUXay0AIFMElXG2rQ4uiE+7ncwtiOdPfYK1NK2XA= +golang.org/x/telemetry v0.0.0-20251203150158-8fff8a5912fc/go.mod h1:hKdjCMrbv9skySur+Nek8Hd0uJ0GuxJIoIX2payrIdQ= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= +golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3 h1:DnoIG+QAMaF5NvxnGe/oKsgKcAc6PcUyl8q0VetfQ8s= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.11.0 h1:z2ZkgNqW34d0oYUzd80RRlc0L9kWtenqK4kflZG1lGc= +gonum.org/v1/plot v0.11.0/go.mod h1:fH9YnKnDKax0u5EzHVXvhN5HJwtMFWIOLNuhgUahbCQ= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= +google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.46.0/go.mod h1:ceL4oozhkAiTID8XMmJBsIxID/9wMXJVVFXPg4ylg3I= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.64.0/go.mod h1:931CdxA8Rm4t6zqTFGSsgwbAEZ2+GMYurbndwSimebM= +google.golang.org/api v0.66.0/go.mod h1:I1dmXYpX7HGwz/ejRxwQp2qj5bFAz93HiCU1C1oYd9M= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.68.0/go.mod h1:sOM8pTpwgflXRhz+oC8H2Dr+UcbMqkPPWNJo88Q7TH8= +google.golang.org/api v0.69.0/go.mod h1:boanBiw+h5c3s+tBPgEzLDRHfFLWV0qXxRHz3ws7C80= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.241.0 h1:QKwqWQlkc6O895LchPEDUSYr22Xp3NCxpQRiWTB6avE= +google.golang.org/api v0.241.0/go.mod h1:cOVEm2TpdAGHL2z+UwyS+kmlGr3bVWQQ6sYEqkKje50= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210517163617-5e0236093d7a/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79/go.mod h1:yiaVoXHpRzHGyxV3o4DktVWY4mSUErTKaeEOq6C3t3U= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211018162055-cf77aa76bad2/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220114231437-d2e6a121cae0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220201184016-50beb8ab5c44/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220204002441-d6cc3cc0770e/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220211171837-173942840c17/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220216160803-4663080d8bc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78= +google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:49MsLSx0oWMOZqcpB3uL8ZOkAh1+TndpJ8ONoCBWiZk= +google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a h1:SGktgSolFCo75dnHJF2yMvnns6jCmHFJ0vE4Vn2JKvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a/go.mod h1:a77HrdMjoeKbnd2jmgcWdaS++ZLZAEq3orIOAEIKiVw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7 h1:pFyd6EwwL2TqFf8emdthzeX+gZE1ElRq3iM8pui4KBY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250707201910-8d1bb00bc6a7/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.74.2 h1:WoosgB65DlWVC9FqI82dGsZhWFNBSLjQ84bjROOpMu4= +google.golang.org/grpc v1.74.2/go.mod h1:CtQ+BGjaAIXHs/5YS3i473GqwBBa1zGQNevxdeBEXrM= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= +google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/go-jose/go-jose.v2 v2.6.3 h1:nt80fvSDlhKWQgSWyHyy5CfmlQr+asih51R8PTWNKKs= +gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEIoEdZlFBI= +gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo= +gopkg.in/jcmturner/dnsutils.v1 v1.0.1/go.mod h1:m3v+5svpVOhtFAP/wSz+yzh4Mc0Fg7eRhxkJMWSIz9Q= +gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= +gopkg.in/jcmturner/gokrb5.v7 v7.3.0/go.mod h1:l8VISx+WGYp+Fp7KRbsiUuXTTOnxIc3Tuvyavf11/WM= +gopkg.in/jcmturner/rpc.v1 v1.1.0/go.mod h1:YIdkC4XfD6GXbzje11McwsDuOlZQSb9W4vfLvuNnlv8= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/src-d/go-errors.v1 v1.0.0 h1:cooGdZnCjYbeS1zb1s6pVAAimTdKceRrpn7aKOnNIfc= +gopkg.in/src-d/go-errors.v1 v1.0.0/go.mod h1:q1cBlomlw2FnDBDNGlnh6X0jPihy+QxZfMMNxPCbdYg= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.5.6 h1:Ld4mkIickM+EliaQZQx3uOJDJHtrd70MxAUqWqlx3Y8= +gorm.io/driver/mysql v1.5.6/go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM= +gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s= +gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/script v0.0.2 h1:eYoG7A3GFC3z1pRx3A2+s/vZ9LA8cxojHyCvslnj4RI= rsc.io/script v0.0.2/go.mod h1:cKBjCtFBBeZ0cbYFRXkRoxP+xGqhArPa9t3VWhtXfzU= diff --git a/internal/beads/beads.go b/internal/beads/beads.go index ed9389f2f..e93aecb3b 100644 --- a/internal/beads/beads.go +++ b/internal/beads/beads.go @@ -233,7 +233,14 @@ func findDatabaseInBeadsDir(beadsDir string, warnOnIssues bool) string { backend := cfg.GetBackend() if backend == configfile.BackendDolt { // For Dolt server mode, database is on the server - no local directory required - return cfg.DatabasePath(beadsDir) + if cfg.IsDoltServerMode() { + return cfg.DatabasePath(beadsDir) + } + // For embedded Dolt, check if the configured database directory exists + doltPath := cfg.DatabasePath(beadsDir) + if info, err := os.Stat(doltPath); err == nil && info.IsDir() { + return doltPath + } } else { // For SQLite, check if the .db file exists dbPath := cfg.DatabasePath(beadsDir) diff --git a/internal/configfile/configfile.go b/internal/configfile/configfile.go index 1a51fb3fd..d9dd68dc1 100644 --- a/internal/configfile/configfile.go +++ b/internal/configfile/configfile.go @@ -19,10 +19,10 @@ type Config struct { // Deletions configuration DeletionsRetentionDays int `json:"deletions_retention_days,omitempty"` // 0 means use default (3 days) - // Dolt connection mode configuration - // Server mode connects to an external dolt sql-server via MySQL protocol. - // The "embedded" value is accepted for backward compatibility but treated as "server". - DoltMode string `json:"dolt_mode,omitempty"` // "server" (only mode supported) + // Dolt connection mode configuration (bd-dolt.2.2) + // Default is "embedded" (in-process). Server mode ("server") connects to an + // external dolt sql-server and should only be used for high-concurrency scenarios. + DoltMode string `json:"dolt_mode,omitempty"` // "embedded" (default) or "server" DoltServerHost string `json:"dolt_server_host,omitempty"` // Server host (default: 127.0.0.1) DoltServerPort int `json:"dolt_server_port,omitempty"` // Server port (default: 3307) DoltServerUser string `json:"dolt_server_user,omitempty"` // MySQL user (default: root) @@ -170,6 +170,11 @@ const ( // // This is intentionally small and stable: callers should use these flags to decide // whether to enable features like daemon/RPC/autostart and process spawning. +// +// NOTE: The embedded Dolt driver is effectively single-writer at the OS-process level. +// Even if multiple goroutines are safe within one process, multiple processes opening +// the same Dolt directory concurrently can cause lock contention and transient +// "read-only" failures. Therefore, Dolt is treated as single-process-only. type BackendCapabilities struct { // SingleProcessOnly indicates the backend must not be accessed from multiple // Beads OS processes concurrently (no daemon mode, no RPC client/server split, @@ -179,21 +184,33 @@ type BackendCapabilities struct { // CapabilitiesForBackend returns capabilities for a backend string. // Unknown backends are treated conservatively as single-process-only. +// +// Note: For Dolt, this returns SingleProcessOnly=true for embedded mode. +// Use Config.GetCapabilities() when you have the full config to properly +// handle server mode (which supports multi-process access). func CapabilitiesForBackend(backend string) BackendCapabilities { switch strings.TrimSpace(strings.ToLower(backend)) { case "", BackendSQLite: return BackendCapabilities{SingleProcessOnly: false} case BackendDolt: - // Dolt uses server mode which supports multi-writer access - return BackendCapabilities{SingleProcessOnly: false} + // Embedded Dolt is single-process-only. + // Server mode is handled by Config.GetCapabilities(). + return BackendCapabilities{SingleProcessOnly: true} default: return BackendCapabilities{SingleProcessOnly: true} } } // GetCapabilities returns the backend capabilities for this config. +// Unlike CapabilitiesForBackend(string), this considers Dolt server mode +// which supports multi-process access. func (c *Config) GetCapabilities() BackendCapabilities { - return CapabilitiesForBackend(c.GetBackend()) + backend := c.GetBackend() + if backend == BackendDolt && c.IsDoltServerMode() { + // Server mode supports multi-writer, so NOT single-process-only + return BackendCapabilities{SingleProcessOnly: false} + } + return CapabilitiesForBackend(backend) } // GetBackend returns the configured backend type, defaulting to SQLite. @@ -219,14 +236,22 @@ const ( ) // IsDoltServerMode returns true if Dolt should connect via sql-server. -// Always returns true for Dolt backends (embedded mode has been removed). +// Server mode is opt-in for high-concurrency scenarios; embedded is the default. +// Checks the BEADS_DOLT_SERVER_MODE env var first, then falls back to the +// dolt_mode field in metadata.json. Only applies when backend is "dolt". func (c *Config) IsDoltServerMode() bool { - return c.GetBackend() == BackendDolt + if os.Getenv("BEADS_DOLT_SERVER_MODE") == "1" && c.GetBackend() == BackendDolt { + return true + } + return c.GetBackend() == BackendDolt && strings.ToLower(c.DoltMode) == DoltModeServer } -// GetDoltMode returns the Dolt connection mode. Always returns "server". +// GetDoltMode returns the Dolt connection mode, defaulting to embedded. func (c *Config) GetDoltMode() string { - return DoltModeServer + if c.DoltMode == "" { + return DoltModeEmbedded + } + return c.DoltMode } // GetDoltServerHost returns the Dolt server host. diff --git a/internal/configfile/configfile_test.go b/internal/configfile/configfile_test.go index 0ecf0bcd7..da82cd07d 100644 --- a/internal/configfile/configfile_test.go +++ b/internal/configfile/configfile_test.go @@ -224,20 +224,20 @@ func TestDoltServerMode(t *testing.T) { want: false, }, { - name: "dolt always server mode", - cfg: &Config{Backend: BackendDolt}, - want: true, - }, - { - name: "dolt with legacy embedded config still returns true", + name: "dolt embedded mode", cfg: &Config{Backend: BackendDolt, DoltMode: DoltModeEmbedded}, - want: true, + want: false, }, { - name: "dolt explicit server mode", + name: "dolt server mode", cfg: &Config{Backend: BackendDolt, DoltMode: DoltModeServer}, want: true, }, + { + name: "dolt default mode", + cfg: &Config{Backend: BackendDolt}, + want: false, // Default is embedded + }, } for _, tt := range tests { @@ -251,21 +251,20 @@ func TestDoltServerMode(t *testing.T) { }) t.Run("GetDoltMode", func(t *testing.T) { - // GetDoltMode always returns "server" regardless of config tests := []struct { name string cfg *Config want string }{ { - name: "empty defaults to server", + name: "empty defaults to embedded", cfg: &Config{}, - want: DoltModeServer, + want: DoltModeEmbedded, }, { - name: "legacy embedded treated as server", + name: "explicit embedded", cfg: &Config{DoltMode: DoltModeEmbedded}, - want: DoltModeServer, + want: DoltModeEmbedded, }, { name: "explicit server", @@ -369,19 +368,28 @@ func TestDoltServerMode(t *testing.T) { }) } -// TestIsDoltServerModeAlwaysTrue tests that IsDoltServerMode is always true for Dolt -func TestIsDoltServerModeAlwaysTrue(t *testing.T) { - t.Run("dolt backend always server mode", func(t *testing.T) { +// TestIsDoltServerModeEnvVar tests env var overrides for IsDoltServerMode +func TestIsDoltServerModeEnvVar(t *testing.T) { + t.Run("env var override with dolt backend", func(t *testing.T) { + t.Setenv("BEADS_DOLT_SERVER_MODE", "1") cfg := &Config{Backend: BackendDolt} if !cfg.IsDoltServerMode() { - t.Error("IsDoltServerMode() = false, want true for dolt backend") + t.Error("IsDoltServerMode() = false, want true when env var set with dolt backend") } }) - t.Run("sqlite backend not server mode", func(t *testing.T) { + t.Run("env var ignored for sqlite backend", func(t *testing.T) { + t.Setenv("BEADS_DOLT_SERVER_MODE", "1") cfg := &Config{Backend: BackendSQLite} if cfg.IsDoltServerMode() { - t.Error("IsDoltServerMode() = true, want false for sqlite backend") + t.Error("IsDoltServerMode() = true, want false when env var set but sqlite backend") + } + }) + + t.Run("env var not set", func(t *testing.T) { + cfg := &Config{Backend: BackendDolt} + if cfg.IsDoltServerMode() { + t.Error("IsDoltServerMode() = true, want false when no config or env var") } }) } @@ -399,8 +407,18 @@ func TestGetCapabilities(t *testing.T) { wantSingleProc: false, }, { - name: "dolt is multi-process (server mode)", + name: "dolt embedded is single-process", + cfg: &Config{Backend: BackendDolt, DoltMode: DoltModeEmbedded}, + wantSingleProc: true, + }, + { + name: "dolt default (empty) is single-process", cfg: &Config{Backend: BackendDolt}, + wantSingleProc: true, + }, + { + name: "dolt server mode is multi-process", + cfg: &Config{Backend: BackendDolt, DoltMode: DoltModeServer}, wantSingleProc: false, }, } diff --git a/internal/storage/dolt/access_lock.go b/internal/storage/dolt/access_lock.go new file mode 100644 index 000000000..aa973a930 --- /dev/null +++ b/internal/storage/dolt/access_lock.go @@ -0,0 +1,97 @@ +package dolt + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "time" + + "github.com/steveyegge/beads/internal/lockfile" +) + +// AccessLock coordinates access to the embedded Dolt database using flock. +// Shared locks allow concurrent readers; exclusive locks ensure single-writer. +// The lock file lives in .beads/dolt-access.lock (alongside daemon.lock). +type AccessLock struct { + file *os.File + path string +} + +const ( + // accessLockFile is the name of the advisory lock file in .beads/. + accessLockFile = "dolt-access.lock" + + // lockPollInterval is how often we retry acquiring the lock. + lockPollInterval = 50 * time.Millisecond +) + +// AcquireAccessLock acquires an advisory flock on the dolt-access.lock file. +// If exclusive is true, acquires an exclusive lock (for writes); otherwise shared (for reads). +// Polls with lockPollInterval until timeout expires. Returns ErrLockBusy on timeout. +// +// The doltDir parameter is the path to the dolt data directory (e.g., .beads/dolt). +// The lock file is placed in the parent directory (.beads/) alongside daemon.lock. +func AcquireAccessLock(doltDir string, exclusive bool, timeout time.Duration) (*AccessLock, error) { + // Lock file goes in parent of dolt dir (i.e., .beads/) + beadsDir := filepath.Dir(doltDir) + lockPath := filepath.Join(beadsDir, accessLockFile) + + // Ensure parent directory exists + if err := os.MkdirAll(beadsDir, 0o750); err != nil { + return nil, fmt.Errorf("create lock dir: %w", err) + } + + // Open or create lock file + // #nosec G304 - controlled path derived from database configuration + f, err := os.OpenFile(lockPath, os.O_CREATE|os.O_RDWR, 0o600) + if err != nil { + return nil, fmt.Errorf("open access lock: %w", err) + } + + // Pick the right lock function + lockFn := lockfile.FlockSharedNonBlock + if exclusive { + lockFn = lockfile.FlockExclusiveNonBlock + } + + // Try once immediately + if err := lockFn(f); err == nil { + return &AccessLock{file: f, path: lockPath}, nil + } else if !errors.Is(err, lockfile.ErrLockBusy) { + _ = f.Close() + return nil, fmt.Errorf("access lock: %w", err) + } + + // Poll until timeout + deadline := time.Now().Add(timeout) + for time.Now().Before(deadline) { + time.Sleep(lockPollInterval) + + if err := lockFn(f); err == nil { + return &AccessLock{file: f, path: lockPath}, nil + } else if !errors.Is(err, lockfile.ErrLockBusy) { + _ = f.Close() + return nil, fmt.Errorf("access lock: %w", err) + } + } + + _ = f.Close() + kind := "shared" + if exclusive { + kind = "exclusive" + } + return nil, fmt.Errorf("dolt access lock timeout (%s, %v): another bd process is using the database: %w", + kind, timeout, lockfile.ErrLockBusy) +} + +// Release releases the advisory lock and closes the underlying file. +// Safe to call multiple times (idempotent). +func (l *AccessLock) Release() { + if l == nil || l.file == nil { + return + } + _ = lockfile.FlockUnlock(l.file) + _ = l.file.Close() + l.file = nil +} diff --git a/internal/storage/dolt/adaptive_length.go b/internal/storage/dolt/adaptive_length.go index 606f06e60..05e4bbf4a 100644 --- a/internal/storage/dolt/adaptive_length.go +++ b/internal/storage/dolt/adaptive_length.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/bootstrap.go b/internal/storage/dolt/bootstrap.go new file mode 100644 index 000000000..10e48ccdf --- /dev/null +++ b/internal/storage/dolt/bootstrap.go @@ -0,0 +1,590 @@ +//go:build cgo +package dolt + +import ( + "bufio" + "context" + "encoding/json" + "fmt" + "os" + "path/filepath" + "strings" + "time" + + "github.com/steveyegge/beads/internal/audit" + "github.com/steveyegge/beads/internal/lockfile" + "github.com/steveyegge/beads/internal/routing" + "github.com/steveyegge/beads/internal/types" + "github.com/steveyegge/beads/internal/utils" +) + +// BootstrapResult contains statistics about the bootstrap operation +type BootstrapResult struct { + IssuesImported int + IssuesSkipped int + RoutesImported int + InteractionsImported int + ParseErrors []ParseError + PrefixDetected string +} + +// ParseError describes a JSONL parsing error +type ParseError struct { + Line int + Message string + Snippet string +} + +// BootstrapConfig controls bootstrap behavior +type BootstrapConfig struct { + BeadsDir string // Path to .beads directory + DoltPath string // Path to dolt subdirectory + LockTimeout time.Duration // Timeout waiting for bootstrap lock +} + +// Bootstrap checks if Dolt DB needs bootstrapping from JSONL and performs it if needed. +// This is called during store creation to handle the cold-start scenario where +// JSONL files exist (from git clone) but no Dolt database exists yet. +// +// Returns: +// - true, result, nil: Bootstrap was performed successfully +// - false, nil, nil: No bootstrap needed (Dolt already exists or no JSONL) +// - false, nil, err: Bootstrap failed +func Bootstrap(ctx context.Context, cfg BootstrapConfig) (bool, *BootstrapResult, error) { + if cfg.LockTimeout == 0 { + cfg.LockTimeout = 30 * time.Second + } + + // Check if Dolt database already exists and is ready + if doltExists(cfg.DoltPath) && schemaReady(ctx, cfg.DoltPath) { + return false, nil, nil + } + + // Check if JSONL exists to bootstrap from + jsonlPath := findJSONLPath(cfg.BeadsDir) + if jsonlPath == "" { + // No JSONL to bootstrap from - let normal init handle it + return false, nil, nil + } + + // Acquire bootstrap lock to prevent concurrent bootstraps + lockPath := cfg.DoltPath + ".bootstrap.lock" + lockFile, err := acquireBootstrapLock(lockPath, cfg.LockTimeout) + if err != nil { + return false, nil, fmt.Errorf("bootstrap lock timeout: %w", err) + } + defer releaseBootstrapLock(lockFile, lockPath) + + // Double-check after acquiring lock - another process may have bootstrapped + if doltExists(cfg.DoltPath) && schemaReady(ctx, cfg.DoltPath) { + return false, nil, nil + } + + // Perform bootstrap + result, err := performBootstrap(ctx, cfg, jsonlPath) + if err != nil { + return false, nil, err + } + + return true, result, nil +} + +// doltExists checks if a Dolt database directory exists +func doltExists(doltPath string) bool { + // The embedded Dolt driver creates the database in a subdirectory + // named after the database (default: "beads"), with .dolt inside that. + // So we check for any subdirectory containing a .dolt directory. + entries, err := os.ReadDir(doltPath) + if err != nil { + return false + } + + for _, entry := range entries { + // Use os.Stat to follow symlinks - entry.IsDir() returns false for symlinks + fullPath := filepath.Join(doltPath, entry.Name()) + info, err := os.Stat(fullPath) + if err != nil { + continue + } + if info.IsDir() { + doltDir := filepath.Join(fullPath, ".dolt") + if doltInfo, err := os.Stat(doltDir); err == nil && doltInfo.IsDir() { + return true + } + } + } + return false +} + +// schemaReady checks if the Dolt database has the required schema +// This is a simple check based on the existence of expected files. +// We avoid opening a connection here since the caller will do that. +func schemaReady(_ context.Context, doltPath string) bool { + // The embedded Dolt driver stores databases in subdirectories. + // Check for the expected database name's config.json which indicates + // the database was initialized. + configPath := filepath.Join(doltPath, "beads", ".dolt", "config.json") + _, err := os.Stat(configPath) + return err == nil +} + +// findJSONLPath looks for JSONL files in the beads directory +func findJSONLPath(beadsDir string) string { + // Check in order of preference + candidates := []string{ + filepath.Join(beadsDir, "issues.jsonl"), + filepath.Join(beadsDir, "beads.jsonl"), // Legacy name + } + + for _, path := range candidates { + if info, err := os.Stat(path); err == nil && !info.IsDir() { + return path + } + } + + return "" +} + +// staleLockAge is the maximum age of a lock file before it's considered stale. +// Bootstrap operations should complete well within this window. +const staleLockAge = 5 * time.Minute + +// acquireBootstrapLock acquires an exclusive lock for bootstrap operations. +// Uses non-blocking flock with polling to respect the timeout deadline. +// Detects and cleans up stale lock files from crashed processes. +func acquireBootstrapLock(lockPath string, timeout time.Duration) (*os.File, error) { + // Check for stale lock file before attempting to acquire. + // If the lock file is very old, the holding process likely crashed + // without cleanup. Remove it so we can proceed. + if info, err := os.Stat(lockPath); err == nil { + age := time.Since(info.ModTime()) + if age > staleLockAge { + fmt.Fprintf(os.Stderr, "Bootstrap: removing stale lock file (age: %s)\n", age.Round(time.Second)) + _ = os.Remove(lockPath) + } + } + + // Create lock file + // #nosec G304 - controlled path + f, err := os.OpenFile(lockPath, os.O_CREATE|os.O_RDWR, 0600) + if err != nil { + return nil, fmt.Errorf("failed to create lock file: %w", err) + } + + // Try to acquire lock with non-blocking flock and polling. + // The previous implementation used FlockExclusiveBlocking which blocks + // indefinitely, making the timeout unreachable. + deadline := time.Now().Add(timeout) + for { + err := lockfile.FlockExclusiveNonBlocking(f) + if err == nil { + // Lock acquired - update modification time for stale detection + return f, nil + } + + if !lockfile.IsLocked(err) { + // Unexpected error (not contention) + _ = f.Close() + return nil, fmt.Errorf("failed to acquire bootstrap lock: %w", err) + } + + if time.Now().After(deadline) { + _ = f.Close() + return nil, fmt.Errorf("timeout after %s waiting for bootstrap lock (another bootstrap may be running)", timeout) + } + + // Wait briefly before retrying + time.Sleep(100 * time.Millisecond) + } +} + +// releaseBootstrapLock releases the bootstrap lock and removes the lock file +func releaseBootstrapLock(f *os.File, lockPath string) { + if f != nil { + _ = lockfile.FlockUnlock(f) + _ = f.Close() + } + // Clean up lock file + _ = os.Remove(lockPath) +} + +// performBootstrap performs the actual bootstrap from JSONL files. +// Import order: routes -> issues -> interactions (dependencies require issues to exist) +func performBootstrap(ctx context.Context, cfg BootstrapConfig, jsonlPath string) (*BootstrapResult, error) { + result := &BootstrapResult{} + + // Parse issues JSONL with graceful error handling + issues, parseErrors := parseJSONLWithErrors(jsonlPath) + result.ParseErrors = parseErrors + + if len(parseErrors) > 0 { + fmt.Fprintf(os.Stderr, "Bootstrap: Skipped %d malformed lines during bootstrap:\n", len(parseErrors)) + maxShow := 5 + if len(parseErrors) < maxShow { + maxShow = len(parseErrors) + } + for i := 0; i < maxShow; i++ { + e := parseErrors[i] + fmt.Fprintf(os.Stderr, " Line %d: %s\n", e.Line, e.Message) + } + if len(parseErrors) > maxShow { + fmt.Fprintf(os.Stderr, " ... and %d more\n", len(parseErrors)-maxShow) + } + } + + if len(issues) == 0 { + return nil, fmt.Errorf("no valid issues found in JSONL file %s", jsonlPath) + } + + // Detect prefix from issues + result.PrefixDetected = detectPrefixFromIssues(issues) + + // Create Dolt store (this initializes schema) + store, err := New(ctx, &Config{Path: cfg.DoltPath}) + if err != nil { + return nil, fmt.Errorf("failed to create Dolt store: %w", err) + } + defer func() { _ = store.Close() }() + + // Set issue prefix + if result.PrefixDetected != "" { + if err := store.SetConfig(ctx, "issue_prefix", result.PrefixDetected); err != nil { + return nil, fmt.Errorf("failed to set issue_prefix: %w", err) + } + } + + // Import routes first (no dependencies) + routesImported, err := importRoutesBootstrap(ctx, store, cfg.BeadsDir) + if err != nil { + // Non-fatal - routes.jsonl may not exist + fmt.Fprintf(os.Stderr, "Bootstrap: warning: failed to import routes: %v\n", err) + } + result.RoutesImported = routesImported + + // Import issues in a transaction + imported, skipped, err := importIssuesBootstrap(ctx, store, issues) + if err != nil { + return nil, fmt.Errorf("failed to import issues: %w", err) + } + + result.IssuesImported = imported + result.IssuesSkipped = skipped + + // Import interactions (after issues, since interactions may reference issue_id) + interactionsPath := filepath.Join(cfg.BeadsDir, "interactions.jsonl") + interactionsImported, err := importInteractionsBootstrap(ctx, store, interactionsPath) + if err != nil { + // Non-fatal - interactions.jsonl may not exist + fmt.Fprintf(os.Stderr, "Bootstrap: warning: failed to import interactions: %v\n", err) + } + result.InteractionsImported = interactionsImported + + // Commit the bootstrap + if err := store.Commit(ctx, "Bootstrap from JSONL"); err != nil { + // Non-fatal - data is still in the database + fmt.Fprintf(os.Stderr, "Bootstrap: warning: failed to create Dolt commit: %v\n", err) + } + + return result, nil +} + +// parseJSONLWithErrors parses JSONL, collecting errors instead of failing +func parseJSONLWithErrors(jsonlPath string) ([]*types.Issue, []ParseError) { + // #nosec G304 - controlled path + f, err := os.Open(jsonlPath) + if err != nil { + return nil, []ParseError{{Line: 0, Message: fmt.Sprintf("failed to open file: %v", err)}} + } + defer func() { _ = f.Close() }() + + var issues []*types.Issue + var parseErrors []ParseError + + scanner := bufio.NewScanner(f) + scanner.Buffer(make([]byte, 0, 1024), 2*1024*1024) // 2MB buffer for large lines + lineNo := 0 + + for scanner.Scan() { + lineNo++ + line := scanner.Text() + if strings.TrimSpace(line) == "" { + continue + } + + // Skip Git merge conflict markers + trimmed := strings.TrimSpace(line) + if strings.HasPrefix(trimmed, "<<<<<<< ") || + trimmed == "=======" || + strings.HasPrefix(trimmed, ">>>>>>> ") { + parseErrors = append(parseErrors, ParseError{ + Line: lineNo, + Message: "Git merge conflict marker", + Snippet: truncateSnippet(line, 50), + }) + continue + } + + var issue types.Issue + if err := json.Unmarshal([]byte(line), &issue); err != nil { + parseErrors = append(parseErrors, ParseError{ + Line: lineNo, + Message: err.Error(), + Snippet: truncateSnippet(line, 50), + }) + continue + } + + // Apply defaults for omitted fields + issue.SetDefaults() + + // Fix closed_at invariant + if issue.Status == types.StatusClosed && issue.ClosedAt == nil { + now := time.Now() + issue.ClosedAt = &now + } + + issues = append(issues, &issue) + } + + if err := scanner.Err(); err != nil { + parseErrors = append(parseErrors, ParseError{ + Line: lineNo, + Message: fmt.Sprintf("scanner error: %v", err), + }) + } + + return issues, parseErrors +} + +// truncateSnippet truncates a string for display +func truncateSnippet(s string, maxLen int) string { + if len(s) > maxLen { + return s[:maxLen] + "..." + } + return s +} + +// detectPrefixFromIssues detects the most common prefix from issues +func detectPrefixFromIssues(issues []*types.Issue) string { + prefixCounts := make(map[string]int) + + for _, issue := range issues { + if issue.ID == "" { + continue + } + prefix := utils.ExtractIssuePrefix(issue.ID) + if prefix != "" { + prefixCounts[prefix]++ + } + } + + // Find most common prefix + var maxPrefix string + var maxCount int + for prefix, count := range prefixCounts { + if count > maxCount { + maxPrefix = prefix + maxCount = count + } + } + + return maxPrefix +} + +// importIssuesBootstrap imports issues during bootstrap +// Returns (imported, skipped, error) +func importIssuesBootstrap(ctx context.Context, store *DoltStore, issues []*types.Issue) (int, int, error) { + // Skip validation during bootstrap since we're importing existing data + // The data was already validated when originally created + + tx, err := store.db.BeginTx(ctx, nil) + if err != nil { + return 0, 0, fmt.Errorf("failed to begin transaction: %w", err) + } + defer func() { _ = tx.Rollback() }() + + imported := 0 + skipped := 0 + seenIDs := make(map[string]bool) + + for _, issue := range issues { + // Skip duplicates within batch + if seenIDs[issue.ID] { + skipped++ + continue + } + seenIDs[issue.ID] = true + + // Set timestamps if missing + now := time.Now().UTC() + if issue.CreatedAt.IsZero() { + issue.CreatedAt = now + } + if issue.UpdatedAt.IsZero() { + issue.UpdatedAt = now + } + + // Compute content hash if missing + if issue.ContentHash == "" { + issue.ContentHash = issue.ComputeContentHash() + } + + // Insert issue + if err := insertIssue(ctx, tx, issue); err != nil { + // Check for duplicate key (issue already exists) + if strings.Contains(err.Error(), "Duplicate entry") || + strings.Contains(err.Error(), "UNIQUE constraint") { + skipped++ + continue + } + return imported, skipped, fmt.Errorf("failed to insert issue %s: %w", issue.ID, err) + } + + // Import labels + for _, label := range issue.Labels { + _, err := tx.ExecContext(ctx, ` + INSERT INTO labels (issue_id, label) + VALUES (?, ?) + `, issue.ID, label) + if err != nil && !strings.Contains(err.Error(), "Duplicate entry") { + return imported, skipped, fmt.Errorf("failed to insert label for %s: %w", issue.ID, err) + } + } + + imported++ + } + + // Import dependencies in a second pass (after all issues exist) + for _, issue := range issues { + for _, dep := range issue.Dependencies { + // Check if both issues exist + var exists int + err := tx.QueryRowContext(ctx, "SELECT 1 FROM issues WHERE id = ?", dep.DependsOnID).Scan(&exists) + if err != nil { + // Target doesn't exist, skip dependency + continue + } + + _, err = tx.ExecContext(ctx, ` + INSERT INTO dependencies (issue_id, depends_on_id, type, created_by, created_at) + VALUES (?, ?, ?, ?, ?) + ON DUPLICATE KEY UPDATE type = type + `, dep.IssueID, dep.DependsOnID, dep.Type, "bootstrap", time.Now().UTC()) + if err != nil && !strings.Contains(err.Error(), "Duplicate entry") { + // Non-fatal for dependencies + fmt.Fprintf(os.Stderr, "Bootstrap: warning: failed to import dependency %s -> %s: %v\n", + dep.IssueID, dep.DependsOnID, err) + } + } + } + + if err := tx.Commit(); err != nil { + return imported, skipped, fmt.Errorf("failed to commit: %w", err) + } + + return imported, skipped, nil +} + +// importRoutesBootstrap imports routes from routes.jsonl during bootstrap +// Returns the number of routes imported +func importRoutesBootstrap(ctx context.Context, store *DoltStore, beadsDir string) (int, error) { + routes, err := routing.LoadRoutes(beadsDir) + if err != nil { + return 0, err + } + if len(routes) == 0 { + return 0, nil // No routes to import + } + + tx, err := store.db.BeginTx(ctx, nil) + if err != nil { + return 0, fmt.Errorf("failed to begin transaction: %w", err) + } + defer func() { _ = tx.Rollback() }() + + imported := 0 + for _, route := range routes { + _, err := tx.ExecContext(ctx, ` + INSERT INTO routes (prefix, path, created_at) + VALUES (?, ?, ?) + ON DUPLICATE KEY UPDATE path = VALUES(path) + `, route.Prefix, route.Path, time.Now().UTC()) + if err != nil { + return imported, fmt.Errorf("failed to insert route %s: %w", route.Prefix, err) + } + imported++ + } + + if err := tx.Commit(); err != nil { + return imported, fmt.Errorf("failed to commit routes: %w", err) + } + + return imported, nil +} + +// importInteractionsBootstrap imports interactions from interactions.jsonl during bootstrap +// Returns the number of interactions imported +func importInteractionsBootstrap(ctx context.Context, store *DoltStore, interactionsPath string) (int, error) { + // #nosec G304 - controlled path + f, err := os.Open(interactionsPath) + if err != nil { + if os.IsNotExist(err) { + return 0, nil // No interactions file is not an error + } + return 0, err + } + defer func() { _ = f.Close() }() + + tx, err := store.db.BeginTx(ctx, nil) + if err != nil { + return 0, fmt.Errorf("failed to begin transaction: %w", err) + } + defer func() { _ = tx.Rollback() }() + + imported := 0 + scanner := bufio.NewScanner(f) + scanner.Buffer(make([]byte, 0, 1024), 2*1024*1024) // 2MB buffer for large lines + + for scanner.Scan() { + line := scanner.Text() + if strings.TrimSpace(line) == "" { + continue + } + + var entry audit.Entry + if err := json.Unmarshal([]byte(line), &entry); err != nil { + // Skip malformed lines during bootstrap + continue + } + + // Convert extra map to JSON (default to empty object for valid JSON) + extraJSON := []byte("{}") + if entry.Extra != nil { + extraJSON, _ = json.Marshal(entry.Extra) + } + + _, err := tx.ExecContext(ctx, ` + INSERT INTO interactions (id, kind, created_at, actor, issue_id, model, prompt, response, error, tool_name, exit_code, parent_id, label, reason, extra) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + ON DUPLICATE KEY UPDATE kind = kind + `, entry.ID, entry.Kind, entry.CreatedAt, entry.Actor, entry.IssueID, entry.Model, entry.Prompt, entry.Response, entry.Error, entry.ToolName, entry.ExitCode, entry.ParentID, entry.Label, entry.Reason, extraJSON) + if err != nil && !strings.Contains(err.Error(), "Duplicate entry") { + // Non-fatal - skip individual failures + fmt.Fprintf(os.Stderr, "Bootstrap: warning: failed to import interaction %s: %v\n", entry.ID, err) + continue + } + imported++ + } + + if err := scanner.Err(); err != nil { + return imported, fmt.Errorf("scanner error: %w", err) + } + + if err := tx.Commit(); err != nil { + return imported, fmt.Errorf("failed to commit interactions: %w", err) + } + + return imported, nil +} + + diff --git a/internal/storage/dolt/bootstrap_test.go b/internal/storage/dolt/bootstrap_test.go new file mode 100644 index 000000000..370e90053 --- /dev/null +++ b/internal/storage/dolt/bootstrap_test.go @@ -0,0 +1,503 @@ +//go:build cgo +package dolt + +import ( + "context" + "encoding/json" + "os" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/steveyegge/beads/internal/types" +) + +func TestBootstrapFromJSONL(t *testing.T) { + // Create temp directory structure + tmpDir := t.TempDir() + beadsDir := filepath.Join(tmpDir, ".beads") + doltDir := filepath.Join(beadsDir, "dolt") + if err := os.MkdirAll(beadsDir, 0755); err != nil { + t.Fatalf("failed to create beads dir: %v", err) + } + + // Create test JSONL file with issues + jsonlPath := filepath.Join(beadsDir, "issues.jsonl") + issues := []types.Issue{ + { + ID: "test-001", + Title: "First issue", + Description: "Test description 1", + Status: types.StatusOpen, + Priority: 2, + IssueType: types.TypeTask, + CreatedAt: time.Now().Add(-time.Hour), + UpdatedAt: time.Now(), + }, + { + ID: "test-002", + Title: "Second issue", + Description: "Test description 2", + Status: types.StatusInProgress, + Priority: 1, + IssueType: types.TypeBug, + CreatedAt: time.Now().Add(-2 * time.Hour), + UpdatedAt: time.Now().Add(-30 * time.Minute), + Labels: []string{"urgent", "backend"}, + }, + { + ID: "test-003", + Title: "Closed issue", + Status: types.StatusClosed, + Priority: 3, + IssueType: types.TypeTask, + }, + } + + var jsonlContent strings.Builder + for _, issue := range issues { + data, err := json.Marshal(issue) + if err != nil { + t.Fatalf("failed to marshal issue: %v", err) + } + jsonlContent.Write(data) + jsonlContent.WriteString("\n") + } + + if err := os.WriteFile(jsonlPath, []byte(jsonlContent.String()), 0644); err != nil { + t.Fatalf("failed to write JSONL: %v", err) + } + + // Perform bootstrap + ctx := context.Background() + bootstrapped, result, err := Bootstrap(ctx, BootstrapConfig{ + BeadsDir: beadsDir, + DoltPath: doltDir, + LockTimeout: 10 * time.Second, + }) + + if err != nil { + t.Fatalf("bootstrap failed: %v", err) + } + if !bootstrapped { + t.Fatal("expected bootstrap to be performed") + } + if result == nil { + t.Fatal("expected non-nil result") + } + + // Verify results + if result.IssuesImported != 3 { + t.Errorf("expected 3 issues imported, got %d", result.IssuesImported) + } + if result.PrefixDetected != "test" { + t.Errorf("expected prefix 'test', got '%s'", result.PrefixDetected) + } + + // Open store and verify issues were imported + store, err := New(ctx, &Config{Path: doltDir}) + if err != nil { + t.Fatalf("failed to open store: %v", err) + } + defer store.Close() + + // Check prefix was set + prefix, err := store.GetConfig(ctx, "issue_prefix") + if err != nil { + t.Fatalf("failed to get config: %v", err) + } + if prefix != "test" { + t.Errorf("expected prefix 'test', got '%s'", prefix) + } + + // Check issues exist + issue1, err := store.GetIssue(ctx, "test-001") + if err != nil { + t.Fatalf("failed to get issue: %v", err) + } + if issue1 == nil { + t.Fatal("expected issue test-001 to exist") + } + if issue1.Title != "First issue" { + t.Errorf("expected title 'First issue', got '%s'", issue1.Title) + } + + // Check labels were imported + issue2, err := store.GetIssue(ctx, "test-002") + if err != nil { + t.Fatalf("failed to get issue: %v", err) + } + if issue2 == nil { + t.Fatal("expected issue test-002 to exist") + } + if len(issue2.Labels) != 2 { + t.Errorf("expected 2 labels, got %d", len(issue2.Labels)) + } + + // Verify closed_at was set for closed issue + issue3, err := store.GetIssue(ctx, "test-003") + if err != nil { + t.Fatalf("failed to get issue: %v", err) + } + if issue3 == nil { + t.Fatal("expected issue test-003 to exist") + } + if issue3.ClosedAt == nil { + t.Error("expected closed_at to be set for closed issue") + } +} + +func TestBootstrapNoOpWhenDoltExists(t *testing.T) { + // Create temp directory structure with existing Dolt DB + tmpDir := t.TempDir() + beadsDir := filepath.Join(tmpDir, ".beads") + doltDir := filepath.Join(beadsDir, "dolt") + if err := os.MkdirAll(beadsDir, 0755); err != nil { + t.Fatalf("failed to create beads dir: %v", err) + } + + // Create a Dolt store first + ctx := context.Background() + store, err := New(ctx, &Config{Path: doltDir}) + if err != nil { + t.Fatalf("failed to create store: %v", err) + } + if err := store.SetConfig(ctx, "issue_prefix", "existing"); err != nil { + t.Fatalf("failed to set config: %v", err) + } + store.Close() + + // Create JSONL file + jsonlPath := filepath.Join(beadsDir, "issues.jsonl") + issue := types.Issue{ + ID: "new-001", + Title: "New issue", + Status: types.StatusOpen, + } + data, _ := json.Marshal(issue) + if err := os.WriteFile(jsonlPath, append(data, '\n'), 0644); err != nil { + t.Fatalf("failed to write JSONL: %v", err) + } + + // Attempt bootstrap - should be no-op + bootstrapped, result, err := Bootstrap(ctx, BootstrapConfig{ + BeadsDir: beadsDir, + DoltPath: doltDir, + LockTimeout: 10 * time.Second, + }) + + if err != nil { + t.Fatalf("bootstrap failed: %v", err) + } + if bootstrapped { + t.Error("expected no bootstrap when Dolt already exists") + } + if result != nil { + t.Error("expected nil result when no bootstrap performed") + } + + // Verify original prefix preserved + store, err = New(ctx, &Config{Path: doltDir}) + if err != nil { + t.Fatalf("failed to reopen store: %v", err) + } + defer store.Close() + + prefix, _ := store.GetConfig(ctx, "issue_prefix") + if prefix != "existing" { + t.Errorf("expected prefix 'existing', got '%s'", prefix) + } +} + +func TestBootstrapNoOpWhenNoJSONL(t *testing.T) { + // Create temp directory structure without JSONL + tmpDir := t.TempDir() + beadsDir := filepath.Join(tmpDir, ".beads") + doltDir := filepath.Join(beadsDir, "dolt") + if err := os.MkdirAll(beadsDir, 0755); err != nil { + t.Fatalf("failed to create beads dir: %v", err) + } + + // Attempt bootstrap - should be no-op + ctx := context.Background() + bootstrapped, result, err := Bootstrap(ctx, BootstrapConfig{ + BeadsDir: beadsDir, + DoltPath: doltDir, + LockTimeout: 10 * time.Second, + }) + + if err != nil { + t.Fatalf("bootstrap failed: %v", err) + } + if bootstrapped { + t.Error("expected no bootstrap when no JSONL exists") + } + if result != nil { + t.Error("expected nil result when no bootstrap performed") + } +} + +func TestBootstrapGracefulDegradation(t *testing.T) { + // Create temp directory structure + tmpDir := t.TempDir() + beadsDir := filepath.Join(tmpDir, ".beads") + doltDir := filepath.Join(beadsDir, "dolt") + if err := os.MkdirAll(beadsDir, 0755); err != nil { + t.Fatalf("failed to create beads dir: %v", err) + } + + // Create JSONL with some malformed lines + jsonlPath := filepath.Join(beadsDir, "issues.jsonl") + goodIssue := types.Issue{ + ID: "test-001", + Title: "Good issue", + Status: types.StatusOpen, + } + goodData, _ := json.Marshal(goodIssue) + + content := string(goodData) + "\n" + + "{invalid json}\n" + + "<<<<<<< HEAD\n" + // Git conflict marker + string(goodData) + "\n" // Duplicate - will be skipped + + if err := os.WriteFile(jsonlPath, []byte(content), 0644); err != nil { + t.Fatalf("failed to write JSONL: %v", err) + } + + // Perform bootstrap + ctx := context.Background() + bootstrapped, result, err := Bootstrap(ctx, BootstrapConfig{ + BeadsDir: beadsDir, + DoltPath: doltDir, + LockTimeout: 10 * time.Second, + }) + + if err != nil { + t.Fatalf("bootstrap failed: %v", err) + } + if !bootstrapped { + t.Fatal("expected bootstrap to be performed") + } + + // Should have parse errors for malformed lines + if len(result.ParseErrors) != 2 { + t.Errorf("expected 2 parse errors, got %d", len(result.ParseErrors)) + } + + // Should have imported the good issue + if result.IssuesImported != 1 { + t.Errorf("expected 1 issue imported, got %d", result.IssuesImported) + } + + // Duplicate should be skipped (not errored) + if result.IssuesSkipped != 1 { + t.Errorf("expected 1 issue skipped, got %d", result.IssuesSkipped) + } +} + +func TestParseJSONLWithErrors(t *testing.T) { + // Create temp file with mixed content + tmpDir := t.TempDir() + jsonlPath := filepath.Join(tmpDir, "test.jsonl") + + goodIssue := types.Issue{ + ID: "test-001", + Title: "Good issue", + Status: types.StatusOpen, + } + goodData, _ := json.Marshal(goodIssue) + + content := string(goodData) + "\n" + + "\n" + // Empty line - should be skipped + " \n" + // Whitespace line - should be skipped + "{broken\n" + // Invalid JSON + "<<<<<<< HEAD\n" + // Git conflict + "=======\n" + // Git conflict + ">>>>>>> branch\n" + // Git conflict + string(goodData) + "\n" // Another good line + + if err := os.WriteFile(jsonlPath, []byte(content), 0644); err != nil { + t.Fatalf("failed to write file: %v", err) + } + + issues, errors := parseJSONLWithErrors(jsonlPath) + + if len(issues) != 2 { + t.Errorf("expected 2 issues, got %d", len(issues)) + } + + // Should have 4 parse errors: 1 invalid JSON + 3 conflict markers + if len(errors) != 4 { + t.Errorf("expected 4 parse errors, got %d: %+v", len(errors), errors) + } +} + +func TestDetectPrefixFromIssues(t *testing.T) { + issues := []*types.Issue{ + {ID: "proj-001"}, + {ID: "proj-002"}, + {ID: "proj-003"}, + {ID: "other-001"}, + } + + prefix := detectPrefixFromIssues(issues) + if prefix != "proj" { + t.Errorf("expected prefix 'proj', got '%s'", prefix) + } +} + +func TestBootstrapWithRoutesAndInteractions(t *testing.T) { + // Create temp directory structure + tmpDir := t.TempDir() + beadsDir := filepath.Join(tmpDir, ".beads") + doltDir := filepath.Join(beadsDir, "dolt") + if err := os.MkdirAll(beadsDir, 0755); err != nil { + t.Fatalf("failed to create beads dir: %v", err) + } + + // Create test issues JSONL + jsonlPath := filepath.Join(beadsDir, "issues.jsonl") + issue := types.Issue{ + ID: "test-001", + Title: "Test issue", + Status: types.StatusOpen, + } + data, _ := json.Marshal(issue) + if err := os.WriteFile(jsonlPath, append(data, '\n'), 0644); err != nil { + t.Fatalf("failed to write issues JSONL: %v", err) + } + + // Create test routes JSONL + routesPath := filepath.Join(beadsDir, "routes.jsonl") + routesContent := `{"prefix":"test-","path":"."} +{"prefix":"other-","path":"other/rig"} +` + if err := os.WriteFile(routesPath, []byte(routesContent), 0644); err != nil { + t.Fatalf("failed to write routes JSONL: %v", err) + } + + // Create test interactions JSONL + interactionsPath := filepath.Join(beadsDir, "interactions.jsonl") + interactionsContent := `{"id":"int-001","kind":"llm_call","created_at":"2025-01-20T10:00:00Z","actor":"test-agent","model":"claude-3"} +{"id":"int-002","kind":"tool_call","created_at":"2025-01-20T10:01:00Z","actor":"test-agent","tool_name":"bash","exit_code":0} +` + if err := os.WriteFile(interactionsPath, []byte(interactionsContent), 0644); err != nil { + t.Fatalf("failed to write interactions JSONL: %v", err) + } + + // Perform bootstrap + ctx := context.Background() + bootstrapped, result, err := Bootstrap(ctx, BootstrapConfig{ + BeadsDir: beadsDir, + DoltPath: doltDir, + LockTimeout: 10 * time.Second, + }) + + if err != nil { + t.Fatalf("bootstrap failed: %v", err) + } + if !bootstrapped { + t.Fatal("expected bootstrap to be performed") + } + if result == nil { + t.Fatal("expected non-nil result") + } + + // Verify issues imported + if result.IssuesImported != 1 { + t.Errorf("expected 1 issue imported, got %d", result.IssuesImported) + } + + // Verify routes imported + if result.RoutesImported != 2 { + t.Errorf("expected 2 routes imported, got %d", result.RoutesImported) + } + + // Verify interactions imported + if result.InteractionsImported != 2 { + t.Errorf("expected 2 interactions imported, got %d", result.InteractionsImported) + } + + // Open store and verify data + store, err := New(ctx, &Config{Path: doltDir}) + if err != nil { + t.Fatalf("failed to open store: %v", err) + } + defer store.Close() + + // Verify routes table + var routeCount int + err = store.db.QueryRowContext(ctx, "SELECT COUNT(*) FROM routes").Scan(&routeCount) + if err != nil { + t.Fatalf("failed to count routes: %v", err) + } + if routeCount != 2 { + t.Errorf("expected 2 routes in table, got %d", routeCount) + } + + // Verify interactions table + var interactionCount int + err = store.db.QueryRowContext(ctx, "SELECT COUNT(*) FROM interactions").Scan(&interactionCount) + if err != nil { + t.Fatalf("failed to count interactions: %v", err) + } + if interactionCount != 2 { + t.Errorf("expected 2 interactions in table, got %d", interactionCount) + } +} + +func TestBootstrapWithoutOptionalFiles(t *testing.T) { + // Test that bootstrap succeeds when routes.jsonl and interactions.jsonl don't exist + tmpDir := t.TempDir() + beadsDir := filepath.Join(tmpDir, ".beads") + doltDir := filepath.Join(beadsDir, "dolt") + if err := os.MkdirAll(beadsDir, 0755); err != nil { + t.Fatalf("failed to create beads dir: %v", err) + } + + // Create only issues JSONL + jsonlPath := filepath.Join(beadsDir, "issues.jsonl") + issue := types.Issue{ + ID: "test-001", + Title: "Test issue", + Status: types.StatusOpen, + } + data, _ := json.Marshal(issue) + if err := os.WriteFile(jsonlPath, append(data, '\n'), 0644); err != nil { + t.Fatalf("failed to write issues JSONL: %v", err) + } + + // Perform bootstrap - should succeed even without routes.jsonl and interactions.jsonl + ctx := context.Background() + bootstrapped, result, err := Bootstrap(ctx, BootstrapConfig{ + BeadsDir: beadsDir, + DoltPath: doltDir, + LockTimeout: 10 * time.Second, + }) + + if err != nil { + t.Fatalf("bootstrap failed: %v", err) + } + if !bootstrapped { + t.Fatal("expected bootstrap to be performed") + } + if result == nil { + t.Fatal("expected non-nil result") + } + + // Verify issues imported + if result.IssuesImported != 1 { + t.Errorf("expected 1 issue imported, got %d", result.IssuesImported) + } + + // Routes and interactions should be 0 (files don't exist) + if result.RoutesImported != 0 { + t.Errorf("expected 0 routes imported, got %d", result.RoutesImported) + } + if result.InteractionsImported != 0 { + t.Errorf("expected 0 interactions imported, got %d", result.InteractionsImported) + } +} + + diff --git a/internal/storage/dolt/concurrent_test.go b/internal/storage/dolt/concurrent_test.go index b23940aec..1e83cbe13 100644 --- a/internal/storage/dolt/concurrent_test.go +++ b/internal/storage/dolt/concurrent_test.go @@ -1,4 +1,4 @@ -// Package dolt provides concurrency tests for Dolt with multiple writers. +// Package dolt provides concurrency tests for embedded Dolt with multiple writers. // // These tests validate that Gas Town can safely run multiple polecats concurrently, // all writing to the same Dolt DB for creating issues, updating status, diff --git a/internal/storage/dolt/config.go b/internal/storage/dolt/config.go index 475bdb591..0981ffbcd 100644 --- a/internal/storage/dolt/config.go +++ b/internal/storage/dolt/config.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/credentials.go b/internal/storage/dolt/credentials.go index 40779d152..0f3d79517 100644 --- a/internal/storage/dolt/credentials.go +++ b/internal/storage/dolt/credentials.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/dependencies.go b/internal/storage/dolt/dependencies.go index 0c24892fa..d095c0e7c 100644 --- a/internal/storage/dolt/dependencies.go +++ b/internal/storage/dolt/dependencies.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( @@ -83,7 +84,7 @@ func (s *DoltStore) GetDependenciesWithMetadata(ctx context.Context, issueID str } // Collect dep metadata first, then close rows before fetching issues. - // This avoids connection pool deadlock when MaxOpenConns=1. + // This avoids connection pool deadlock when MaxOpenConns=1 (embedded dolt). type depMeta struct { depID, depType string } @@ -149,7 +150,7 @@ func (s *DoltStore) GetDependentsWithMetadata(ctx context.Context, issueID strin } // Collect dep metadata first, then close rows before fetching issues. - // This avoids connection pool deadlock when MaxOpenConns=1. + // This avoids connection pool deadlock when MaxOpenConns=1 (embedded dolt). type depMeta struct { depID, depType string } diff --git a/internal/storage/dolt/dependencies_extended_test.go b/internal/storage/dolt/dependencies_extended_test.go index 382ced8fe..7dcc9d640 100644 --- a/internal/storage/dolt/dependencies_extended_test.go +++ b/internal/storage/dolt/dependencies_extended_test.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( @@ -11,10 +12,10 @@ import ( // ============================================================================= func TestGetDependenciesWithMetadata(t *testing.T) { - // Note: This test is skipped because GetDependenciesWithMetadata + // Note: This test is skipped in embedded Dolt mode because GetDependenciesWithMetadata // makes nested GetIssue calls inside a rows cursor, which can cause connection issues. // This is a known limitation of the current implementation (see bd-tdgo.3). - t.Skip("Skipping: GetDependenciesWithMetadata has nested query issue in Dolt mode") + t.Skip("Skipping: GetDependenciesWithMetadata has nested query issue in embedded Dolt mode") } func TestGetDependenciesWithMetadata_NoResults(t *testing.T) { @@ -51,10 +52,10 @@ func TestGetDependenciesWithMetadata_NoResults(t *testing.T) { // ============================================================================= func TestGetDependentsWithMetadata(t *testing.T) { - // Note: This test is skipped because GetDependentsWithMetadata + // Note: This test is skipped in embedded Dolt mode because GetDependentsWithMetadata // makes nested GetIssue calls inside a rows cursor, which can cause connection issues. // This is a known limitation of the current implementation (see bd-tdgo.3). - t.Skip("Skipping: GetDependentsWithMetadata has nested query issue in Dolt mode") + t.Skip("Skipping: GetDependentsWithMetadata has nested query issue in embedded Dolt mode") } // ============================================================================= diff --git a/internal/storage/dolt/dirty.go b/internal/storage/dolt/dirty.go index a60aa480d..b0b345233 100644 --- a/internal/storage/dolt/dirty.go +++ b/internal/storage/dolt/dirty.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/dolt_benchmark_test.go b/internal/storage/dolt/dolt_benchmark_test.go index 88bc961f8..2f7ff42f5 100644 --- a/internal/storage/dolt/dolt_benchmark_test.go +++ b/internal/storage/dolt/dolt_benchmark_test.go @@ -1,3 +1,5 @@ +//go:build cgo + // Package dolt provides performance benchmarks for the Dolt storage backend. // Run with: go test -bench=. -benchmem ./internal/storage/dolt/... // @@ -69,9 +71,9 @@ func setupBenchStore(b *testing.B) (*DoltStore, func()) { // Bootstrap & Connection Benchmarks // ============================================================================= -// BenchmarkBootstrap measures store initialization time. +// BenchmarkBootstrapEmbedded measures store initialization time in embedded mode. // This is the critical path for CLI commands that open/close the store each time. -func BenchmarkBootstrap(b *testing.B) { +func BenchmarkBootstrapEmbedded(b *testing.B) { if _, err := os.LookupEnv("DOLT_PATH"); err != false { if _, err := os.Stat("/usr/local/bin/dolt"); os.IsNotExist(err) { if _, err := os.Stat("/usr/bin/dolt"); os.IsNotExist(err) { @@ -94,6 +96,7 @@ func BenchmarkBootstrap(b *testing.B) { CommitterName: "bench", CommitterEmail: "bench@example.com", Database: "benchdb", + ServerMode: false, // Force embedded mode } initStore, err := New(ctx, cfg) @@ -141,6 +144,7 @@ func BenchmarkColdStart(b *testing.B) { CommitterName: "bench", CommitterEmail: "bench@example.com", Database: "benchdb", + ServerMode: false, // Force embedded mode } b.ResetTimer() @@ -224,6 +228,7 @@ func BenchmarkCLIWorkflow(b *testing.B) { CommitterName: "bench", CommitterEmail: "bench@example.com", Database: "benchdb", + ServerMode: false, } b.ResetTimer() diff --git a/internal/storage/dolt/dolt_test.go b/internal/storage/dolt/dolt_test.go index e0b70df2f..8990aa81b 100644 --- a/internal/storage/dolt/dolt_test.go +++ b/internal/storage/dolt/dolt_test.go @@ -15,6 +15,9 @@ import ( ) // testTimeout is the maximum time for any single test operation. +// The embedded Dolt driver can be slow, especially for complex JOIN queries. +// If tests are timing out, it may indicate an issue with the embedded Dolt +// driver's async operations rather than with the DoltStore implementation. const testTimeout = 30 * time.Second // testContext returns a context with timeout for test operations @@ -70,8 +73,7 @@ func setupTestStore(t *testing.T) (*DoltStore, func()) { store, err := New(ctx, cfg) if err != nil { os.RemoveAll(tmpDir) - // Server mode requires a running Dolt server - skip if unavailable - t.Skipf("failed to create Dolt store: %v", err) + t.Fatalf("failed to create Dolt store: %v", err) } // Set up issue prefix diff --git a/internal/storage/dolt/embedded_uow.go b/internal/storage/dolt/embedded_uow.go new file mode 100644 index 000000000..29ea17876 --- /dev/null +++ b/internal/storage/dolt/embedded_uow.go @@ -0,0 +1,90 @@ +//go:build cgo +package dolt + +import ( + "context" + "database/sql" + "errors" + + embedded "github.com/dolthub/driver" + + "github.com/steveyegge/beads/internal/storage/doltutil" +) + +func ignoreContextCanceled(err error) error { + if err == nil { + return nil + } + // Dolt engine close paths may surface context.Canceled from background goroutines / shutdown plumbing. + // For unit-of-work helpers, we treat that as non-fatal cleanup noise. + if errors.Is(err, context.Canceled) { + return nil + } + return err +} + +// withEmbeddedDolt executes exactly one unit of work using a single embedded Dolt connector. +// +// Lifecycle: +// 1) ParseDSN +// 2) configure (e.g. enable retries by setting cfg.BackOff) +// 3) NewConnector +// 4) sql.OpenDB(connector) +// 5) PingContext(ctx) to force open (and retries) +// 6) fn(ctx, db) +// 7) db.Close() +// 8) connector.Close() to release filesystem locks +// +// IMPORTANT: This helper does not wrap or modify ctx (no timeouts). The embedded driver derives +// a session context from the Connect(ctx) context and reuses it across statements. +func withEmbeddedDolt( + ctx context.Context, + dsn string, + configure func(cfg *embedded.Config), + fn func(ctx context.Context, db *sql.DB) error, +) (err error) { + if ctx == nil { + ctx = context.Background() + } + if fn == nil { + return errors.New("withEmbeddedDolt: fn is required") + } + + cfg, err := embedded.ParseDSN(dsn) + if err != nil { + return err + } + if configure != nil { + configure(&cfg) + } + + connector, err := embedded.NewConnector(cfg) + if err != nil { + return err + } + db := sql.OpenDB(connector) + + defer func() { + // Close DB first (stops pool activity), then close the connector to release engine locks. + // Use CloseWithTimeout to prevent indefinite hangs (same issue as DoltStore.Close). + cerr := errors.Join( + ignoreContextCanceled(doltutil.CloseWithTimeout("db", db.Close)), + ignoreContextCanceled(doltutil.CloseWithTimeout("connector", connector.Close)), + ) + if err == nil { + err = cerr + } else { + err = errors.Join(err, cerr) + } + }() + + // Force open (and retries if configured) before entering the unit of work. + if err := db.PingContext(ctx); err != nil { + return err + } + + return fn(ctx, db) +} + + + diff --git a/internal/storage/dolt/events.go b/internal/storage/dolt/events.go index a05d11dc3..59ec1ec1f 100644 --- a/internal/storage/dolt/events.go +++ b/internal/storage/dolt/events.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/federation.go b/internal/storage/dolt/federation.go index 4c5036cc3..73da2b77d 100644 --- a/internal/storage/dolt/federation.go +++ b/internal/storage/dolt/federation.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/history.go b/internal/storage/dolt/history.go index 39d578007..ba78588ef 100644 --- a/internal/storage/dolt/history.go +++ b/internal/storage/dolt/history.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/history_test.go b/internal/storage/dolt/history_test.go index 02f255e42..7919f6afe 100644 --- a/internal/storage/dolt/history_test.go +++ b/internal/storage/dolt/history_test.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/hub_spokes_integration_test.go b/internal/storage/dolt/hub_spokes_integration_test.go index 7e040815a..2b0afd6f6 100644 --- a/internal/storage/dolt/hub_spokes_integration_test.go +++ b/internal/storage/dolt/hub_spokes_integration_test.go @@ -489,6 +489,7 @@ func setupHubWithNSpokes(t *testing.T, ctx context.Context, n int) (*HubSpokeSet hubStore, err := New(ctx, &Config{ Path: hubDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 14307, CommitterName: "hub-mayor", @@ -560,6 +561,7 @@ func setupHubWithNSpokes(t *testing.T, ctx context.Context, n int) (*HubSpokeSet spokeStore, err := New(ctx, &Config{ Path: spokeDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 14308 + i, CommitterName: spokeName, diff --git a/internal/storage/dolt/issues.go b/internal/storage/dolt/issues.go index e3e27c9a9..eb54b7f5f 100644 --- a/internal/storage/dolt/issues.go +++ b/internal/storage/dolt/issues.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/labels.go b/internal/storage/dolt/labels.go index c0bfd24be..218062574 100644 --- a/internal/storage/dolt/labels.go +++ b/internal/storage/dolt/labels.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/labels_test.go b/internal/storage/dolt/labels_test.go index fd54b6ad3..715c31839 100644 --- a/internal/storage/dolt/labels_test.go +++ b/internal/storage/dolt/labels_test.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( @@ -127,9 +128,9 @@ func TestGetLabelsForIssues_NoLabels(t *testing.T) { func TestGetIssuesByLabel(t *testing.T) { // Skip: GetIssuesByLabel makes nested queries (GetIssue calls inside a rows cursor) - // which can cause connection issues with single-connection pools. + // which can cause connection issues in embedded Dolt mode. // This is a known limitation that should be fixed in bd-tdgo.3. - t.Skip("Skipping: GetIssuesByLabel has nested query issue in Dolt mode") + t.Skip("Skipping: GetIssuesByLabel has nested query issue in embedded Dolt mode") } func TestGetIssuesByLabel_NoMatches(t *testing.T) { diff --git a/internal/storage/dolt/migrations.go b/internal/storage/dolt/migrations.go index 831be1694..2347e3ed3 100644 --- a/internal/storage/dolt/migrations.go +++ b/internal/storage/dolt/migrations.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/migrations/001_wisp_type_column.go b/internal/storage/dolt/migrations/001_wisp_type_column.go index c97b604f5..5724e2d67 100644 --- a/internal/storage/dolt/migrations/001_wisp_type_column.go +++ b/internal/storage/dolt/migrations/001_wisp_type_column.go @@ -1,3 +1,4 @@ +//go:build cgo package migrations import ( diff --git a/internal/storage/dolt/migrations/002_spec_id_column.go b/internal/storage/dolt/migrations/002_spec_id_column.go index 939b7b748..cb1e149dd 100644 --- a/internal/storage/dolt/migrations/002_spec_id_column.go +++ b/internal/storage/dolt/migrations/002_spec_id_column.go @@ -1,3 +1,4 @@ +//go:build cgo package migrations import ( diff --git a/internal/storage/dolt/migrations/helpers.go b/internal/storage/dolt/migrations/helpers.go index 916d8f8da..4440b2f95 100644 --- a/internal/storage/dolt/migrations/helpers.go +++ b/internal/storage/dolt/migrations/helpers.go @@ -1,3 +1,4 @@ +//go:build cgo package migrations import ( diff --git a/internal/storage/dolt/migrations/migrations_test.go b/internal/storage/dolt/migrations/migrations_test.go index 74b149160..e573a84ba 100644 --- a/internal/storage/dolt/migrations/migrations_test.go +++ b/internal/storage/dolt/migrations/migrations_test.go @@ -1,85 +1,70 @@ +//go:build cgo package migrations import ( "database/sql" "fmt" "os" - "os/exec" "path/filepath" "testing" - "time" - _ "github.com/go-sql-driver/mysql" + embedded "github.com/dolthub/driver" + + "github.com/steveyegge/beads/internal/storage/doltutil" ) -// openTestDolt creates a temporary Dolt database via sql-server for testing. +// openTestDolt creates a temporary embedded Dolt database for testing. func openTestDolt(t *testing.T) *sql.DB { t.Helper() - - // Skip if dolt is not available - if _, err := exec.LookPath("dolt"); err != nil { - t.Skip("dolt not installed, skipping test") - } - tmpDir := t.TempDir() dbPath := filepath.Join(tmpDir, "testdb") if err := os.MkdirAll(dbPath, 0755); err != nil { t.Fatalf("failed to create db dir: %v", err) } - // Initialize dolt repo - cmd := exec.Command("dolt", "init") - cmd.Dir = dbPath - if err := cmd.Run(); err != nil { - t.Fatalf("failed to init dolt repo: %v", err) - } - - // Start dolt sql-server on a random-ish port - port := 13400 + os.Getpid()%100 - serverCmd := exec.Command("dolt", "sql-server", - "--host", "127.0.0.1", - "--port", fmt.Sprintf("%d", port), - "--no-auto-commit", - ) - serverCmd.Dir = dbPath - serverCmd.Stdout = os.Stderr - serverCmd.Stderr = os.Stderr - if err := serverCmd.Start(); err != nil { - t.Fatalf("failed to start dolt sql-server: %v", err) - } - t.Cleanup(func() { - if serverCmd.Process != nil { - _ = serverCmd.Process.Kill() - _ = serverCmd.Wait() - } - }) - - // Wait for server to be ready - dsn := fmt.Sprintf("root:@tcp(127.0.0.1:%d)/?parseTime=true", port) - var db *sql.DB - var err error - for i := 0; i < 30; i++ { - db, err = sql.Open("mysql", dsn) - if err == nil { - if pingErr := db.Ping(); pingErr == nil { - break - } - _ = db.Close() - } - time.Sleep(100 * time.Millisecond) - } + absPath, err := filepath.Abs(dbPath) if err != nil { - t.Fatalf("failed to connect to dolt sql-server: %v", err) + t.Fatalf("failed to get abs path: %v", err) } - // Create database and schema - if _, err := db.Exec("CREATE DATABASE IF NOT EXISTS beads"); err != nil { + // First connect without database to create it + initDSN := fmt.Sprintf("file://%s?commitname=test&commitemail=test@test.com", absPath) + initCfg, err := embedded.ParseDSN(initDSN) + if err != nil { + t.Fatalf("failed to parse init DSN: %v", err) + } + + initConnector, err := embedded.NewConnector(initCfg) + if err != nil { + t.Fatalf("failed to create init connector: %v", err) + } + + initDB := sql.OpenDB(initConnector) + _, err = initDB.Exec("CREATE DATABASE IF NOT EXISTS beads") + if err != nil { + _ = doltutil.CloseWithTimeout("initDB", initDB.Close) + _ = doltutil.CloseWithTimeout("initConnector", initConnector.Close) t.Fatalf("failed to create database: %v", err) } - if _, err := db.Exec("USE beads"); err != nil { - t.Fatalf("failed to use database: %v", err) + _ = doltutil.CloseWithTimeout("initDB", initDB.Close) + _ = doltutil.CloseWithTimeout("initConnector", initConnector.Close) + + // Now connect with database specified + dsn := fmt.Sprintf("file://%s?commitname=test&commitemail=test@test.com&database=beads", absPath) + cfg, err := embedded.ParseDSN(dsn) + if err != nil { + t.Fatalf("failed to parse DSN: %v", err) } + connector, err := embedded.NewConnector(cfg) + if err != nil { + t.Fatalf("failed to create connector: %v", err) + } + t.Cleanup(func() { _ = doltutil.CloseWithTimeout("connector", connector.Close) }) + + db := sql.OpenDB(connector) + t.Cleanup(func() { _ = doltutil.CloseWithTimeout("db", db.Close) }) + // Create minimal issues table without wisp_type (simulating old schema) _, err = db.Exec(`CREATE TABLE IF NOT EXISTS issues ( id VARCHAR(255) PRIMARY KEY, @@ -92,15 +77,6 @@ func openTestDolt(t *testing.T) *sql.DB { t.Fatalf("failed to create issues table: %v", err) } - // Reconnect with database in DSN - _ = db.Close() - dbDSN := fmt.Sprintf("root:@tcp(127.0.0.1:%d)/beads?parseTime=true", port) - db, err = sql.Open("mysql", dbDSN) - if err != nil { - t.Fatalf("failed to connect to beads database: %v", err) - } - t.Cleanup(func() { _ = db.Close() }) - return db } @@ -175,3 +151,5 @@ func TestTableExists(t *testing.T) { t.Fatal("nonexistent table should not exist") } } + + diff --git a/internal/storage/dolt/nested_query_test.go b/internal/storage/dolt/nested_query_test.go index 712cc3893..6bd484ae1 100644 --- a/internal/storage/dolt/nested_query_test.go +++ b/internal/storage/dolt/nested_query_test.go @@ -65,6 +65,7 @@ func TestServerModeNestedQueries(t *testing.T) { store, err := New(ctx, &Config{ Path: tmpDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 13308, }) @@ -193,6 +194,7 @@ func TestServerModeDependencyQueries(t *testing.T) { store, err := New(ctx, &Config{ Path: tmpDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 13309, }) @@ -348,6 +350,7 @@ func TestServerModeTransactionSearchIssues(t *testing.T) { store, err := New(ctx, &Config{ Path: tmpDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 13310, }) @@ -473,6 +476,7 @@ func TestServerModeScanIssueIDs(t *testing.T) { store, err := New(ctx, &Config{ Path: tmpDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 13311, }) diff --git a/internal/storage/dolt/peer_sync_integration_test.go b/internal/storage/dolt/peer_sync_integration_test.go index 4446b9517..0f8846ea8 100644 --- a/internal/storage/dolt/peer_sync_integration_test.go +++ b/internal/storage/dolt/peer_sync_integration_test.go @@ -599,6 +599,7 @@ func setupTwoTowns(t *testing.T, ctx context.Context) (*TownSetup, *TownSetup) { alphaStore, err := New(ctx, &Config{ Path: alphaDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 13307, CommitterName: "alpha-town", @@ -661,6 +662,7 @@ func setupTwoTowns(t *testing.T, ctx context.Context) (*TownSetup, *TownSetup) { betaStore, err := New(ctx, &Config{ Path: betaDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 13308, CommitterName: "beta-town", diff --git a/internal/storage/dolt/procattr_unix.go b/internal/storage/dolt/procattr_unix.go index 5adc580c4..fc140f658 100644 --- a/internal/storage/dolt/procattr_unix.go +++ b/internal/storage/dolt/procattr_unix.go @@ -1,4 +1,4 @@ -//go:build !windows +//go:build cgo && !windows package dolt diff --git a/internal/storage/dolt/procattr_windows.go b/internal/storage/dolt/procattr_windows.go index a78c93829..ef3509fd7 100644 --- a/internal/storage/dolt/procattr_windows.go +++ b/internal/storage/dolt/procattr_windows.go @@ -1,4 +1,4 @@ -//go:build windows +//go:build cgo && windows package dolt diff --git a/internal/storage/dolt/process_unix.go b/internal/storage/dolt/process_unix.go index 6f2c58a49..422ab18c4 100644 --- a/internal/storage/dolt/process_unix.go +++ b/internal/storage/dolt/process_unix.go @@ -1,4 +1,4 @@ -//go:build !windows +//go:build cgo && !windows package dolt diff --git a/internal/storage/dolt/process_windows.go b/internal/storage/dolt/process_windows.go index f3436a94a..d3dcaa731 100644 --- a/internal/storage/dolt/process_windows.go +++ b/internal/storage/dolt/process_windows.go @@ -1,4 +1,4 @@ -//go:build windows +//go:build cgo && windows package dolt diff --git a/internal/storage/dolt/queries.go b/internal/storage/dolt/queries.go index 75bfbe1c4..89cccd826 100644 --- a/internal/storage/dolt/queries.go +++ b/internal/storage/dolt/queries.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/rename.go b/internal/storage/dolt/rename.go index 5bf8e4633..f93da46e6 100644 --- a/internal/storage/dolt/rename.go +++ b/internal/storage/dolt/rename.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/retry_test.go b/internal/storage/dolt/retry_test.go index 82cda3e09..6bfad52c5 100644 --- a/internal/storage/dolt/retry_test.go +++ b/internal/storage/dolt/retry_test.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( @@ -69,8 +70,26 @@ func TestIsRetryableError(t *testing.T) { } } -func TestWithRetry_Success(t *testing.T) { - store := &DoltStore{} +func TestWithRetry_EmbeddedMode(t *testing.T) { + // In embedded mode (serverMode=false), withRetry should just call the operation once + store := &DoltStore{serverMode: false} + + callCount := 0 + err := store.withRetry(context.Background(), func() error { + callCount++ + return errors.New("driver: bad connection") + }) + + if err == nil { + t.Error("expected error, got nil") + } + if callCount != 1 { + t.Errorf("expected 1 call in embedded mode, got %d", callCount) + } +} + +func TestWithRetry_ServerMode_Success(t *testing.T) { + store := &DoltStore{serverMode: true} callCount := 0 err := store.withRetry(context.Background(), func() error { @@ -86,8 +105,8 @@ func TestWithRetry_Success(t *testing.T) { } } -func TestWithRetry_RetryOnBadConnection(t *testing.T) { - store := &DoltStore{} +func TestWithRetry_ServerMode_RetryOnBadConnection(t *testing.T) { + store := &DoltStore{serverMode: true} callCount := 0 err := store.withRetry(context.Background(), func() error { @@ -106,8 +125,8 @@ func TestWithRetry_RetryOnBadConnection(t *testing.T) { } } -func TestWithRetry_NonRetryableError(t *testing.T) { - store := &DoltStore{} +func TestWithRetry_ServerMode_NonRetryableError(t *testing.T) { + store := &DoltStore{serverMode: true} callCount := 0 err := store.withRetry(context.Background(), func() error { diff --git a/internal/storage/dolt/schema.go b/internal/storage/dolt/schema.go index de85c599d..126f84cd1 100644 --- a/internal/storage/dolt/schema.go +++ b/internal/storage/dolt/schema.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt // schema defines the MySQL-compatible database schema for Dolt. diff --git a/internal/storage/dolt/server.go b/internal/storage/dolt/server.go index 5e9efc79b..5b2ed77ab 100644 --- a/internal/storage/dolt/server.go +++ b/internal/storage/dolt/server.go @@ -1,8 +1,9 @@ +//go:build cgo // Package dolt implements the storage interface using Dolt (versioned MySQL-compatible database). // // This file implements the dolt sql-server management for federation mode. -// When federation is enabled, we run dolt sql-server to enable multi-writer -// support and expose the remotesapi for peer-to-peer sync. +// When federation is enabled, we run dolt sql-server instead of the embedded driver +// to enable multi-writer support and expose the remotesapi for peer-to-peer sync. package dolt import ( diff --git a/internal/storage/dolt/server_integration_test.go b/internal/storage/dolt/server_integration_test.go index 0d0cbc172..5083dd9e5 100644 --- a/internal/storage/dolt/server_integration_test.go +++ b/internal/storage/dolt/server_integration_test.go @@ -57,6 +57,7 @@ func TestServerModeConnection(t *testing.T) { store, err := New(ctx, &Config{ Path: tmpDir, Database: "beads", + ServerMode: true, ServerHost: "127.0.0.1", ServerPort: 13307, }) diff --git a/internal/storage/dolt/store.go b/internal/storage/dolt/store.go index 8c46cfb7a..301898ba1 100644 --- a/internal/storage/dolt/store.go +++ b/internal/storage/dolt/store.go @@ -1,3 +1,5 @@ +//go:build cgo + // Package dolt implements the storage interface using Dolt (versioned MySQL-compatible database). // // Dolt provides native version control for SQL data with cell-level merge, history queries, @@ -5,11 +7,15 @@ // by making the database itself version-controlled. // // Key differences from SQLite backend: -// - Connects to dolt sql-server via MySQL protocol +// - Uses github.com/dolthub/driver for embedded Dolt access // - Supports version control operations (commit, push, pull, branch, merge) // - History queries via AS OF and dolt_history_* tables // - Cell-level merge instead of line-level JSONL merge -// - Multi-writer support via server mode +// +// Connection modes: +// - Embedded: No server required, database/sql interface via dolthub/driver +// - Server: Connect to running dolt sql-server for multi-writer scenarios +// package dolt import ( @@ -26,6 +32,7 @@ import ( "time" "github.com/cenkalti/backoff/v4" + embedded "github.com/dolthub/driver" // Import MySQL driver for server mode connections _ "github.com/go-sql-driver/mysql" @@ -35,12 +42,18 @@ import ( // DoltStore implements the Storage interface using Dolt type DoltStore struct { - db *sql.DB - dbPath string // Path to Dolt database directory - closed atomic.Bool // Tracks whether Close() has been called - connStr string // Connection string for reconnection - mu sync.RWMutex // Protects concurrent access - readOnly bool // True if opened in read-only mode + db *sql.DB + dbPath string // Path to Dolt database directory + closed atomic.Bool // Tracks whether Close() has been called + connStr string // Connection string for reconnection + mu sync.RWMutex // Protects concurrent access + readOnly bool // True if opened in read-only mode + serverMode bool // True if connected to dolt sql-server (vs embedded) + accessLock *AccessLock // Advisory flock preventing concurrent dolt LOCK contention + + // embeddedConnector is non-nil only in embedded mode. It must be closed to release + // filesystem locks held by the embedded engine. + embeddedConnector *embedded.Connector // Version control config committerName string @@ -51,23 +64,35 @@ type DoltStore struct { // Config holds Dolt database configuration type Config struct { - Path string // Path to Dolt database directory - CommitterName string // Git-style committer name - CommitterEmail string // Git-style committer email - Remote string // Default remote name (e.g., "origin") - Database string // Database name within Dolt (default: "beads") - ReadOnly bool // Open in read-only mode (skip schema init) + Path string // Path to Dolt database directory + CommitterName string // Git-style committer name + CommitterEmail string // Git-style committer email + Remote string // Default remote name (e.g., "origin") + Database string // Database name within Dolt (default: "beads") + ReadOnly bool // Open in read-only mode (skip schema init) + OpenTimeout time.Duration // Advisory lock timeout (0 = no advisory lock) - // Server connection options + // Server mode options (federation) + ServerMode bool // Connect to dolt sql-server instead of embedded ServerHost string // Server host (default: 127.0.0.1) ServerPort int // Server port (default: 3307) ServerUser string // MySQL user (default: root) ServerPassword string // MySQL password (default: empty, can be set via BEADS_DOLT_PASSWORD) } -// Server retry configuration. -// go-sql-driver/mysql doesn't have built-in retry. We add retry for transient -// connection errors (stale pool connections, brief network issues, server restarts). +const embeddedOpenMaxElapsed = 30 * time.Second + +func newEmbeddedOpenBackoff() backoff.BackOff { + // BackOff implementations are stateful; always return a fresh instance. + bo := backoff.NewExponentialBackOff() + bo.MaxElapsedTime = embeddedOpenMaxElapsed + return bo +} + +// Server mode retry configuration. +// Server mode uses go-sql-driver/mysql which doesn't have built-in retry like the +// embedded driver. We add retry for transient connection errors (stale pool connections, +// brief network issues, server restarts). const serverRetryMaxElapsed = 30 * time.Second func newServerRetryBackoff() backoff.BackOff { @@ -107,7 +132,12 @@ func isRetryableError(err error) bool { } // withRetry executes an operation with retry for transient errors. +// Only active in server mode; embedded mode has driver-level retry. func (s *DoltStore) withRetry(ctx context.Context, op func() error) error { + if !s.serverMode { + return op() + } + bo := newServerRetryBackoff() return backoff.Retry(func() error { err := op() @@ -147,19 +177,21 @@ func New(ctx context.Context, cfg *Config) (*DoltStore, error) { cfg.Remote = "origin" } - // Server connection defaults - if cfg.ServerHost == "" { - cfg.ServerHost = "127.0.0.1" - } - if cfg.ServerPort == 0 { - cfg.ServerPort = DefaultSQLPort - } - if cfg.ServerUser == "" { - cfg.ServerUser = "root" - } - // Check environment variable for password (more secure than command-line) - if cfg.ServerPassword == "" { - cfg.ServerPassword = os.Getenv("BEADS_DOLT_PASSWORD") + // Server mode defaults + if cfg.ServerMode { + if cfg.ServerHost == "" { + cfg.ServerHost = "127.0.0.1" + } + if cfg.ServerPort == 0 { + cfg.ServerPort = DefaultSQLPort + } + if cfg.ServerUser == "" { + cfg.ServerUser = "root" + } + // Check environment variable for password (more secure than command-line) + if cfg.ServerPassword == "" { + cfg.ServerPassword = os.Getenv("BEADS_DOLT_PASSWORD") + } } // Ensure directory exists @@ -167,51 +199,142 @@ func New(ctx context.Context, cfg *Config) (*DoltStore, error) { return nil, fmt.Errorf("failed to create database directory: %w", err) } + // IMPORTANT: Use an absolute path for embedded DSNs. + // + // The embedded driver sets its internal filesystem working directory to Config.Directory + // and also passes the directory path through to lower layers. If we pass a relative path, + // the working-directory stacking can effectively double it (e.g. ".beads/dolt/.beads/dolt"). absPath, err := filepath.Abs(cfg.Path) if err != nil { return nil, fmt.Errorf("failed to get absolute path: %w", err) } - // Fail-fast TCP check before MySQL protocol initialization. - // This gives an immediate, clear error if the Dolt server isn't running, - // rather than waiting for MySQL driver timeouts. - addr := net.JoinHostPort(cfg.ServerHost, fmt.Sprintf("%d", cfg.ServerPort)) - conn, err := net.DialTimeout("tcp", addr, 500*time.Millisecond) - if err != nil { - return nil, fmt.Errorf("Dolt server unreachable at %s: %w\n\nThe Dolt server may not be running. Try:\n gt dolt start # If using Gas Town\n dolt sql-server # Manual start in database directory", - addr, err) + // Acquire advisory flock before opening dolt (embedded mode only). + // This prevents multiple bd processes from competing for dolt's internal LOCK file. + // Set BD_SKIP_ACCESS_LOCK=1 to bypass flock for testing whether Dolt's internal + // locking is sufficient. See bd-39gso for testing plan. + var accessLock *AccessLock + if !cfg.ServerMode && cfg.OpenTimeout > 0 && os.Getenv("BD_SKIP_ACCESS_LOCK") == "" { + exclusive := !cfg.ReadOnly + var lockErr error + accessLock, lockErr = AcquireAccessLock(absPath, exclusive, cfg.OpenTimeout) + if lockErr != nil { + return nil, fmt.Errorf("failed to acquire dolt access lock: %w", lockErr) + } + } + + var db *sql.DB + var connStr string + var embeddedConnector *embedded.Connector + + if cfg.ServerMode { + // Fail-fast TCP check before MySQL protocol initialization. + // This gives an immediate, clear error if the Dolt server isn't running, + // rather than waiting for MySQL driver timeouts. + addr := net.JoinHostPort(cfg.ServerHost, fmt.Sprintf("%d", cfg.ServerPort)) + conn, err := net.DialTimeout("tcp", addr, 500*time.Millisecond) + if err != nil { + if accessLock != nil { + accessLock.Release() + } + return nil, fmt.Errorf("Dolt server unreachable at %s: %w\n\nThe Dolt server may not be running. Try:\n gt dolt start # If using Gas Town\n dolt sql-server # Manual start in database directory", + addr, err) + } + _ = conn.Close() + + // Server mode: connect via MySQL protocol to dolt sql-server + db, connStr, err = openServerConnection(ctx, cfg) + } else { + // Embedded mode: + // - Perform initialization as explicit units of work (each with its own connector). + // - Then open a fresh connector/DB for the returned store instance. + initDSN := fmt.Sprintf( + "file://%s?commitname=%s&commitemail=%s", + absPath, cfg.CommitterName, cfg.CommitterEmail, + ) + dbDSN := fmt.Sprintf( + "file://%s?commitname=%s&commitemail=%s&database=%s", + absPath, cfg.CommitterName, cfg.CommitterEmail, cfg.Database, + ) + + configureRetries := func(c *embedded.Config) { + // Enable driver open retries for embedded usage. + c.BackOff = newEmbeddedOpenBackoff() + } + + // UOW 1: ensure database exists. Skip in read-only mode. + if !cfg.ReadOnly { + if err := withEmbeddedDolt(ctx, initDSN, configureRetries, func(ctx context.Context, db *sql.DB) error { + _, err := db.ExecContext(ctx, fmt.Sprintf("CREATE DATABASE IF NOT EXISTS `%s`", cfg.Database)) + return err + }); err != nil { + return nil, fmt.Errorf("failed to create dolt database: %w", err) + } + } + + // UOW 2: initialize schema (idempotent). Skip in read-only mode. + if !cfg.ReadOnly { + if err := withEmbeddedDolt(ctx, dbDSN, configureRetries, func(ctx context.Context, db *sql.DB) error { + return initSchemaOnDB(ctx, db) + }); err != nil { + return nil, fmt.Errorf("failed to initialize schema: %w", err) + } + } + + // Open the store connection (fresh connector for subsequent work). + db, connStr, embeddedConnector, err = openEmbeddedConnection(dbDSN) } - _ = conn.Close() - // Connect to dolt sql-server via MySQL protocol - db, connStr, err := openServerConnection(ctx, cfg) if err != nil { + if accessLock != nil { + accessLock.Release() + } return nil, err } // Test connection + // IMPORTANT: In embedded mode, do not use a caller-supplied ctx to open the first + // underlying connection. Many tests (and some call sites) pass contexts that are + // canceled shortly after New() returns; the embedded driver derives a session context + // from Connect(ctx) and reuses it across statements. We force the initial connection + // to be created with a non-canceling context to avoid poisoning the connection pool. pingCtx := ctx + if embeddedConnector != nil { + pingCtx = context.Background() + } if pingCtx == nil { pingCtx = context.Background() } if err := db.PingContext(pingCtx); err != nil { + // Ensure we don't leak filesystem locks if embedded open fails after creating a connector. _ = db.Close() + if embeddedConnector != nil { + _ = embeddedConnector.Close() + } + if accessLock != nil { + accessLock.Release() + } return nil, fmt.Errorf("failed to ping Dolt database: %w", err) } store := &DoltStore{ - db: db, - dbPath: absPath, - connStr: connStr, - committerName: cfg.CommitterName, - committerEmail: cfg.CommitterEmail, - remote: cfg.Remote, - branch: "main", - readOnly: cfg.ReadOnly, + db: db, + dbPath: absPath, + connStr: connStr, + embeddedConnector: embeddedConnector, + committerName: cfg.CommitterName, + committerEmail: cfg.CommitterEmail, + remote: cfg.Remote, + branch: "main", + readOnly: cfg.ReadOnly, + serverMode: cfg.ServerMode, + accessLock: accessLock, } - // Initialize schema (idempotent) - if !cfg.ReadOnly { + // Schema initialization: + // - Embedded mode: already performed above as an explicit unit of work. + // - Server mode: still needs to initialize schema here (idempotent). + if cfg.ServerMode && !cfg.ReadOnly { if err := store.initSchema(ctx); err != nil { return nil, fmt.Errorf("failed to initialize schema: %w", err) } @@ -220,6 +343,31 @@ func New(ctx context.Context, cfg *Config) (*DoltStore, error) { return store, nil } +// openEmbeddedConnection opens a connection using the embedded Dolt driver +func openEmbeddedConnection(dsn string) (*sql.DB, string, *embedded.Connector, error) { + openCfg, err := embedded.ParseDSN(dsn) + if err != nil { + return nil, "", nil, fmt.Errorf("failed to parse Dolt DSN: %w", err) + } + openCfg.BackOff = newEmbeddedOpenBackoff() + + connector, err := embedded.NewConnector(openCfg) + if err != nil { + return nil, "", nil, fmt.Errorf("failed to create Dolt connector: %w", err) + } + db := sql.OpenDB(connector) + + // Configure connection pool + // Dolt embedded mode is single-writer like SQLite + db.SetMaxOpenConns(1) + db.SetMaxIdleConns(1) + db.SetConnMaxLifetime(0) + + // NOTE: connector must be closed by the caller to release filesystem locks. + // DoltStore.Close() will handle this. + return db, dsn, connector, nil +} + // openServerConnection opens a connection to a dolt sql-server via MySQL protocol func openServerConnection(ctx context.Context, cfg *Config) (*sql.DB, string, error) { // DSN format: user:password@tcp(host:port)/database?parseTime=true @@ -445,7 +593,21 @@ func (s *DoltStore) Close() error { } } } + // For embedded mode, ensure the underlying engine is closed to release filesystem locks. + if s.embeddedConnector != nil { + cerr := doltutil.CloseWithTimeout("embeddedConnector", s.embeddedConnector.Close) + // Ignore context cancellation noise from Dolt shutdown plumbing. + if cerr != nil && !errors.Is(cerr, context.Canceled) { + err = errors.Join(err, cerr) + } + s.embeddedConnector = nil + } s.db = nil + // Release advisory lock after db and connector are closed + if s.accessLock != nil { + s.accessLock.Release() + s.accessLock = nil + } return err } diff --git a/internal/storage/dolt/transaction.go b/internal/storage/dolt/transaction.go index bc1e2ea33..81a39f6b6 100644 --- a/internal/storage/dolt/transaction.go +++ b/internal/storage/dolt/transaction.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/util.go b/internal/storage/dolt/util.go index 06387e777..22535deee 100644 --- a/internal/storage/dolt/util.go +++ b/internal/storage/dolt/util.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( diff --git a/internal/storage/dolt/versioned.go b/internal/storage/dolt/versioned.go index 90f0188b9..7499a5b34 100644 --- a/internal/storage/dolt/versioned.go +++ b/internal/storage/dolt/versioned.go @@ -1,3 +1,4 @@ +//go:build cgo package dolt import ( @@ -224,7 +225,8 @@ func (s *DoltStore) GetChangesSinceExport(ctx context.Context, fromCommit string } // If fromCommit equals HEAD, there are no changes. - // Note: This also avoids issues when querying dolt_diff with identical from/to refs. + // Note: This also avoids a nil pointer panic in the embedded Dolt driver + // when querying dolt_diff with identical from/to refs. if fromCommit == currentCommit { return &ExportChanges{Entries: nil}, nil } diff --git a/internal/storage/doltutil/close.go b/internal/storage/doltutil/close.go index a94f63772..c03b29f4c 100644 --- a/internal/storage/doltutil/close.go +++ b/internal/storage/doltutil/close.go @@ -1,4 +1,4 @@ -// Package doltutil provides shared utilities for Dolt operations. +// Package doltutil provides shared utilities for embedded Dolt operations. // This package exists to avoid import cycles between dolt and dolt/migrations. package doltutil @@ -8,9 +8,11 @@ import ( ) // CloseTimeout is the maximum time to wait for close operations. +// Embedded Dolt can hang indefinitely on close; this prevents commands from hanging. const CloseTimeout = 5 * time.Second // CloseWithTimeout runs a close function with a timeout to prevent indefinite hangs. +// This is needed because embedded Dolt's engine can hang during shutdown. // Returns an error if the close times out or if the close function returns an error. func CloseWithTimeout(name string, closeFn func() error) error { done := make(chan error, 1) diff --git a/internal/storage/factory/factory.go b/internal/storage/factory/factory.go index 334b92bfc..fde3601bc 100644 --- a/internal/storage/factory/factory.go +++ b/internal/storage/factory/factory.go @@ -27,11 +27,13 @@ type Options struct { ReadOnly bool LockTimeout time.Duration - // Dolt server connection options + // Dolt server mode options (federation) + ServerMode bool // Connect to dolt sql-server instead of embedded ServerHost string // Server host (default: 127.0.0.1) ServerPort int // Server port (default: 3307) - ServerUser string // MySQL user (default: root) - Database string // Database name for Dolt (default: beads) + ServerUser string // MySQL user (default: root) + Database string // Database name for Dolt server mode (default: beads) + OpenTimeout time.Duration // Advisory lock timeout for embedded dolt (0 = no lock) } // New creates a storage backend based on the backend type. @@ -60,9 +62,9 @@ func NewWithOptions(ctx context.Context, backend, path string, opts Options) (st if factory, ok := backendRegistry[backend]; ok { return factory(ctx, path, opts) } - // Provide helpful error for unknown backends + // Provide helpful error for dolt on systems without CGO if backend == configfile.BackendDolt { - return nil, fmt.Errorf("dolt backend is not registered; ensure the dolt storage package is imported") + return nil, fmt.Errorf("dolt backend requires CGO (not available on this build); use sqlite backend or install from pre-built binaries") } return nil, fmt.Errorf("unknown storage backend: %s (supported: sqlite, dolt)", backend) } @@ -89,18 +91,21 @@ func NewFromConfigWithOptions(ctx context.Context, beadsDir string, opts Options case configfile.BackendSQLite: return NewWithOptions(ctx, backend, cfg.DatabasePath(beadsDir), opts) case configfile.BackendDolt: - // Merge Dolt server config into options (config provides defaults, opts can override) - if opts.ServerHost == "" { - opts.ServerHost = cfg.GetDoltServerHost() - } - if opts.ServerPort == 0 { - opts.ServerPort = cfg.GetDoltServerPort() - } - if opts.ServerUser == "" { - opts.ServerUser = cfg.GetDoltServerUser() - } - if opts.Database == "" { - opts.Database = cfg.GetDoltDatabase() + // Merge Dolt server mode config into options (config provides defaults, opts can override) + if cfg.IsDoltServerMode() { + opts.ServerMode = true + if opts.ServerHost == "" { + opts.ServerHost = cfg.GetDoltServerHost() + } + if opts.ServerPort == 0 { + opts.ServerPort = cfg.GetDoltServerPort() + } + if opts.ServerUser == "" { + opts.ServerUser = cfg.GetDoltServerUser() + } + if opts.Database == "" { + opts.Database = cfg.GetDoltDatabase() + } } return NewWithOptions(ctx, backend, cfg.DatabasePath(beadsDir), opts) default: diff --git a/internal/storage/factory/factory_dolt.go b/internal/storage/factory/factory_dolt.go index 78f036701..7fd0fe8d1 100644 --- a/internal/storage/factory/factory_dolt.go +++ b/internal/storage/factory/factory_dolt.go @@ -1,8 +1,14 @@ +//go:build cgo package factory import ( "context" + "fmt" + "os" + "path/filepath" + "strings" + "github.com/steveyegge/beads/internal/config" "github.com/steveyegge/beads/internal/configfile" "github.com/steveyegge/beads/internal/storage" "github.com/steveyegge/beads/internal/storage/dolt" @@ -10,17 +16,118 @@ import ( func init() { RegisterBackend(configfile.BackendDolt, func(ctx context.Context, path string, opts Options) (storage.Storage, error) { + // Only bootstrap in embedded mode - server mode has database on server + if !opts.ServerMode { + if err := bootstrapEmbeddedDolt(ctx, path, opts); err != nil { + return nil, err + } + } + store, err := dolt.New(ctx, &dolt.Config{ - Path: path, - Database: opts.Database, - ReadOnly: opts.ReadOnly, - ServerHost: opts.ServerHost, - ServerPort: opts.ServerPort, - ServerUser: opts.ServerUser, + Path: path, + Database: opts.Database, + ReadOnly: opts.ReadOnly, + OpenTimeout: opts.OpenTimeout, + ServerMode: opts.ServerMode, + ServerHost: opts.ServerHost, + ServerPort: opts.ServerPort, + ServerUser: opts.ServerUser, }) if err != nil { + // If server mode failed with a connection error, fall back to embedded mode. + // This preserves the 2-tier architecture: server when available, embedded when not. + if opts.ServerMode && isServerConnectionError(err) { + fmt.Fprintf(os.Stderr, "Warning: Dolt server at %s:%d is not reachable, falling back to embedded mode\n", + opts.ServerHost, opts.ServerPort) + + // Run bootstrap for embedded mode (JSONL import if needed) + if berr := bootstrapEmbeddedDolt(ctx, path, opts); berr != nil { + return nil, berr + } + + return dolt.New(ctx, &dolt.Config{ + Path: path, + Database: opts.Database, + ReadOnly: opts.ReadOnly, + OpenTimeout: opts.OpenTimeout, + ServerMode: false, // Fall back to embedded + }) + } return nil, err } return store, nil }) } + +// bootstrapEmbeddedDolt checks if a JSONL-to-Dolt bootstrap is needed and runs it if so. +func bootstrapEmbeddedDolt(ctx context.Context, path string, opts Options) error { + // Path is the dolt subdirectory, parent is .beads directory + beadsDir := filepath.Dir(path) + + // In dolt-native mode, JSONL is export-only backup — never auto-import. + // If the dolt DB doesn't exist in this mode, that's an error, not a bootstrap opportunity. + // This prevents split-brain: without this guard, a wrong path (from B1) would silently + // create a new DB from stale JSONL, diverging from the real dolt-native data. + if config.GetSyncMode() == config.SyncModeDoltNative { + if !hasDoltSubdir(path) { + return fmt.Errorf("dolt database not found at %s (JSONL auto-import is disabled in dolt-native sync mode; run 'bd init --backend=dolt' to create a new database)", path) + } + return nil // Dolt exists, no bootstrap needed + } + + bootstrapped, result, err := dolt.Bootstrap(ctx, dolt.BootstrapConfig{ + BeadsDir: beadsDir, + DoltPath: path, + LockTimeout: opts.LockTimeout, + }) + if err != nil { + return fmt.Errorf("bootstrap failed: %w", err) + } + + if bootstrapped && result != nil { + fmt.Fprintf(os.Stderr, "Bootstrapping Dolt from JSONL...\n") + if len(result.ParseErrors) > 0 { + fmt.Fprintf(os.Stderr, " Skipped %d malformed lines (see above for details)\n", len(result.ParseErrors)) + } + fmt.Fprintf(os.Stderr, " Imported %d issues", result.IssuesImported) + if result.IssuesSkipped > 0 { + fmt.Fprintf(os.Stderr, ", skipped %d duplicates", result.IssuesSkipped) + } + fmt.Fprintf(os.Stderr, "\n Dolt database ready\n") + } + return nil +} + +// hasDoltSubdir checks if the given path contains any subdirectory with a .dolt directory inside. +func hasDoltSubdir(basePath string) bool { + entries, err := os.ReadDir(basePath) + if err != nil { + return false + } + for _, entry := range entries { + if !entry.IsDir() { + continue + } + doltDir := filepath.Join(basePath, entry.Name(), ".dolt") + if info, err := os.Stat(doltDir); err == nil && info.IsDir() { + return true + } + } + return false +} + +// isServerConnectionError returns true if the error indicates the Dolt server +// is unreachable (connection refused, timeout, DNS failure, etc.). +func isServerConnectionError(err error) bool { + if err == nil { + return false + } + errLower := strings.ToLower(err.Error()) + return strings.Contains(errLower, "connection refused") || + strings.Contains(errLower, "no such host") || + strings.Contains(errLower, "i/o timeout") || + strings.Contains(errLower, "connection reset") || + strings.Contains(errLower, "network is unreachable") +} + + diff --git a/internal/storage/factory/factory_dolt_test.go b/internal/storage/factory/factory_dolt_test.go new file mode 100644 index 000000000..3779c35f1 --- /dev/null +++ b/internal/storage/factory/factory_dolt_test.go @@ -0,0 +1,77 @@ +//go:build cgo +package factory + +import ( + "errors" + "testing" +) + +func TestIsServerConnectionError(t *testing.T) { + tests := []struct { + name string + err error + want bool + }{ + { + name: "nil error", + err: nil, + want: false, + }, + { + name: "connection refused", + err: errors.New("dial tcp 127.0.0.1:3307: connect: connection refused"), + want: true, + }, + { + name: "wrapped connection refused", + err: errors.New("failed to connect to Dolt server at 127.0.0.1:3307: dial tcp 127.0.0.1:3307: connect: connection refused"), + want: true, + }, + { + name: "no such host", + err: errors.New("dial tcp: lookup badhost.invalid: no such host"), + want: true, + }, + { + name: "i/o timeout", + err: errors.New("dial tcp 10.0.0.1:3307: i/o timeout"), + want: true, + }, + { + name: "connection reset", + err: errors.New("read tcp 127.0.0.1:54321->127.0.0.1:3307: connection reset by peer"), + want: true, + }, + { + name: "network unreachable", + err: errors.New("dial tcp 192.168.1.1:3307: connect: network is unreachable"), + want: true, + }, + { + name: "auth error is not connection error", + err: errors.New("Error 1045: Access denied for user 'root'@'localhost'"), + want: false, + }, + { + name: "schema error is not connection error", + err: errors.New("failed to create schema: table already exists"), + want: false, + }, + { + name: "database error is not connection error", + err: errors.New("failed to create database: unknown error"), + want: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := isServerConnectionError(tt.err) + if got != tt.want { + t.Errorf("isServerConnectionError(%v) = %v, want %v", tt.err, got, tt.want) + } + }) + } +} + + diff --git a/internal/third_party/go-icu-regex/.github/workflows/test.yml b/internal/third_party/go-icu-regex/.github/workflows/test.yml new file mode 100644 index 000000000..bbded0bfb --- /dev/null +++ b/internal/third_party/go-icu-regex/.github/workflows/test.yml @@ -0,0 +1,46 @@ +name: Test +on: [pull_request] + +concurrency: + group: test-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test: + strategy: + matrix: + go-version: [1.24.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v3 + - name: Install ICU4C (MacOS) + if: ${{ matrix.platform == 'macos-latest' }} + run: | + dir=$(brew --cellar icu4c) + dir="$dir"/$(ls "$dir") + echo CGO_CPPFLAGS=-I$dir/include >> $GITHUB_ENV + echo CGO_LDFLAGS=-L$dir/lib >> $GITHUB_ENV + - name: Install ICU4C (Windows) + if: ${{ matrix.platform == 'windows-latest' }} + uses: msys2/setup-msys2@v2 + with: + path-type: inherit + msystem: UCRT64 + pacboy: icu:p toolchain:p pkg-config:p + - name: Test + if: ${{ matrix.platform == 'macos-latest' }} + run: go test ./... + - name: Test + if: ${{ matrix.platform == 'windows-latest' }} + shell: msys2 {0} + run: | + go.exe test ./... + - name: Test + if: ${{ matrix.platform == 'ubuntu-latest' }} + run: go test -race ./... diff --git a/internal/third_party/go-icu-regex/.gitignore b/internal/third_party/go-icu-regex/.gitignore new file mode 100644 index 000000000..0a050fd92 --- /dev/null +++ b/internal/third_party/go-icu-regex/.gitignore @@ -0,0 +1,44 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Compiled binaries +_example/_example + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +# Tpc-h tbl files +benchmark/*tbl +vendor +Makefile.main +.ci/ +_example/main +_example/*.exe +test-server + +.idea/* +/.vscode/ + +# OSX Files +.DS_Store + +*~ diff --git a/internal/third_party/go-icu-regex/LICENSE b/internal/third_party/go-icu-regex/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/internal/third_party/go-icu-regex/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/internal/third_party/go-icu-regex/README.md b/internal/third_party/go-icu-regex/README.md new file mode 100644 index 000000000..bb52d687d --- /dev/null +++ b/internal/third_party/go-icu-regex/README.md @@ -0,0 +1,38 @@ +# ICU Regular Expressions in Go + +Minimal bindings to [ICU4C](https://github.com/unicode-org/icu)'s regex implementation, for use in Go. + +This package is not intended to be a general purpose binding. It's primary purpose is to support [dolt](https://github.com/dolthub/dolt)'s need for ICU-compatible regexes in order to implement MySQL-compatible functionality. + +# Use + +```go +// Create a regex +regex := regex.CreateRegex(1024) +defer regex.Close() +// Set its pattern +regex.SetRegexString(context.TODO(), "[abc]+", regex.RegexFlags_None) +// Set its match string +regex.SetMatchString(context.TODO(), "123abcabcabcdef") +// Extract a matching substring; note start and occurence number are 1 indexed. +substr, ok, err := regex.Substring(context.TODO(), 1, 1) +assert.NoError(t, err) +assert.True(t, ok) +assert.Equals(t, substr, "abcabcabc") +``` + +# Building and Dependencies + +This library, and consequently anything that depends on it, requires ICU4C to build and link against. This library does not ship a pre-compiled version of ICU4C and does not build ICU4C alongside itself as part of its Cgo binding. Consequently, building this library or anything that depends on it requires a C++ toolchain and a version of ICU4C installed. + +For Windows, this library currently only supports MinGW. We are happy to accept changes to support other toolchains based on Go build tags, for example. + +For Linux, a package like `libicu-dev` typically has the necessary library. + +For Windows, with msys2, `pacman -S icu-devel` installs the necessary development libraries. + +For macOS, `brew install icu4c` will install the necsesary library, but it is not on the default search path of the toolchain. Building with something like `CGO_CPPFLAGS=-I$(brew --cellar icu4c)/$(ls $(brew --cellar icu4c))/include CGO_LDFLAGS=-L$(brew --cellar icu4c)/$(ls $(brew --cellar icu4c))/lib` is potentially necessary. + +There is some support for statically linking ICU4C, by building with the build tag `icu_static`. Currently this only changes the linker line for a Windows build. For a macOS or Linux build to link it statically, the build tag `icu_static` should still be used, but it should also be the case that the dynamic libraries are not installed. + +When using a self-built dynamic library on macOS, the resulting binaries work best if `runConfigureICU` is run with `--enable-rpath`, so that the ICU4C dynamic libraries are discoverable by the built binary at their installed location. diff --git a/internal/third_party/go-icu-regex/format_repo.sh b/internal/third_party/go-icu-regex/format_repo.sh new file mode 100644 index 000000000..d576f43cc --- /dev/null +++ b/internal/third_party/go-icu-regex/format_repo.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Copyright 2023 Dolthub, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +paths=`find . -maxdepth 1 -mindepth 1 \( -name gen -prune -o -type d -print -o -type f -name '*.go' -print \)` + +goimports -w -local github.com/dolthub/go-icu-regex $paths + +bad_files=$(find $paths -name '*.go' | while read f; do + if [[ $(awk '/import \(/{flag=1;next}/\)/{flag=0}flag' < $f | egrep -c '$^') -gt 2 ]]; then + echo $f + fi +done) + +if [ "$bad_files" != "" ]; then + for f in $bad_files; do + awk '/import \(/{flag=1}/\)/{flag=0}flag&&!/^$/||!flag' < "$f" > "$f.bak" + mv "$f.bak" "$f" + done + goimports -w -local github.com/dolthub/go-icu-regex . +fi diff --git a/internal/third_party/go-icu-regex/go.mod b/internal/third_party/go-icu-regex/go.mod new file mode 100644 index 000000000..ef9d468c8 --- /dev/null +++ b/internal/third_party/go-icu-regex/go.mod @@ -0,0 +1,15 @@ +module github.com/dolthub/go-icu-regex + +go 1.24 + +require ( + github.com/stretchr/testify v1.8.2 + gopkg.in/src-d/go-errors.v1 v1.0.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/internal/third_party/go-icu-regex/go.sum b/internal/third_party/go-icu-regex/go.sum new file mode 100644 index 000000000..73b0d969c --- /dev/null +++ b/internal/third_party/go-icu-regex/go.sum @@ -0,0 +1,21 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/src-d/go-errors.v1 v1.0.0 h1:cooGdZnCjYbeS1zb1s6pVAAimTdKceRrpn7aKOnNIfc= +gopkg.in/src-d/go-errors.v1 v1.0.0/go.mod h1:q1cBlomlw2FnDBDNGlnh6X0jPihy+QxZfMMNxPCbdYg= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/third_party/go-icu-regex/internal/icu/file.cpp b/internal/third_party/go-icu-regex/internal/icu/file.cpp new file mode 100644 index 000000000..87f6b2bcb --- /dev/null +++ b/internal/third_party/go-icu-regex/internal/icu/file.cpp @@ -0,0 +1,88 @@ +// This code has been adapted from https://github.com/mysql/mysql-server/blob/ea7087d885006918ad54458e7aad215b1650312c/sql/regexp/regexp_engine.cc + +// #cgo macos CFLAGS: -Ibin/darwin-aarch64/include +// #cgo macos CXXFLAGS: -Ibin/darwin-aarch64/include + +#include "unicode/regex.h" +#include "cstring" + +#ifdef __cplusplus +extern "C" { +#endif + +void appendHead(URegularExpression* m_re, std::u16string& m_replace_buffer, int& m_replace_buffer_pos, UErrorCode* m_error_code, size_t size) { + if (size == 0) { return; } + int32_t text_length32 = 0; + auto text = uregex_getText(m_re, &text_length32, m_error_code); + if (*m_error_code != U_ZERO_ERROR) { return; } + if (m_replace_buffer.size() < size) { m_replace_buffer.resize(size); } + std::copy(text, text + size, &m_replace_buffer.at(0)); + m_replace_buffer_pos = (int)size; +} + +int tryToAppendReplacement(URegularExpression* m_re, std::u16string& m_replace_buffer, int& m_replace_buffer_pos, UErrorCode* m_error_code, UChar* replacement, int replacementLen) { + if (m_replace_buffer.empty()) { return 0; } + UChar* ptr = reinterpret_cast(&m_replace_buffer.at(0) + m_replace_buffer_pos); + int capacity = m_replace_buffer.size() - m_replace_buffer_pos; + return uregex_appendReplacement(m_re, replacement, replacementLen, &ptr, &capacity, m_error_code); +} + +void appendReplacement(URegularExpression* m_re, std::u16string& m_replace_buffer, int& m_replace_buffer_pos, UErrorCode* m_error_code, UChar* replacement, int replacementLen) { + int replacement_size = tryToAppendReplacement(m_re, m_replace_buffer, m_replace_buffer_pos, m_error_code, replacement, replacementLen); + if (*m_error_code == U_BUFFER_OVERFLOW_ERROR) { + size_t required_buffer_size = m_replace_buffer_pos + replacement_size; + m_replace_buffer.resize(required_buffer_size); + *m_error_code = U_ZERO_ERROR; + tryToAppendReplacement(m_re, m_replace_buffer, m_replace_buffer_pos, m_error_code, replacement, replacementLen); + } + m_replace_buffer_pos += replacement_size; +} + +int tryToAppendTail(URegularExpression* m_re, std::u16string& m_replace_buffer, int& m_replace_buffer_pos, UErrorCode* m_error_code) { + if (m_replace_buffer.empty()) { return 0; } + UChar* ptr = reinterpret_cast(&m_replace_buffer.at(0) + m_replace_buffer_pos); + int capacity = m_replace_buffer.size() - m_replace_buffer_pos; + return uregex_appendTail(m_re, &ptr, &capacity, m_error_code); +} + +void appendTail(URegularExpression* m_re, std::u16string& m_replace_buffer, int& m_replace_buffer_pos, UErrorCode* m_error_code) { + int tail_size = tryToAppendTail(m_re, m_replace_buffer, m_replace_buffer_pos, m_error_code); + if (*m_error_code == U_BUFFER_OVERFLOW_ERROR) { + size_t required_buffer_size = m_replace_buffer_pos + tail_size; + m_replace_buffer.resize(required_buffer_size); + *m_error_code = U_ZERO_ERROR; + tryToAppendTail(m_re, m_replace_buffer, m_replace_buffer_pos, m_error_code); + } + m_replace_buffer_pos += tail_size; +} + +UChar* replace(URegularExpression* regexp, UChar* replacement, int replacementLen, UChar* original, int originalSize, int start, int occurrence, int* returnSize) { + *returnSize = originalSize; + UErrorCode m_error_code = U_ZERO_ERROR; + std::u16string m_replace_buffer; + int m_replace_buffer_pos = 0; + bool found = uregex_find(regexp, start, &m_error_code); + int end_of_previous_match = 0; + for (int i = 1; i < occurrence && found; ++i) { + end_of_previous_match = uregex_end(regexp, 0, &m_error_code); + found = uregex_findNext(regexp, &m_error_code); + } + if (!found && U_SUCCESS(m_error_code)) { return original; } + m_replace_buffer.resize(originalSize); + appendHead(regexp, m_replace_buffer, m_replace_buffer_pos, &m_error_code, std::max(end_of_previous_match, start)); + if (found) { + do { + appendReplacement(regexp, m_replace_buffer, m_replace_buffer_pos, &m_error_code, replacement, replacementLen); + } while (occurrence == 0 && uregex_findNext(regexp, &m_error_code)); + } + appendTail(regexp, m_replace_buffer, m_replace_buffer_pos, &m_error_code); + m_replace_buffer.resize(m_replace_buffer_pos); + UChar* returnStr = static_cast(malloc(m_replace_buffer.size() * sizeof(UChar*))); + memcpy(returnStr, m_replace_buffer.data(), m_replace_buffer.size() * sizeof(UChar*)); + *returnSize = m_replace_buffer.size(); + return returnStr; +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/internal/third_party/go-icu-regex/internal/icu/file.h b/internal/third_party/go-icu-regex/internal/icu/file.h new file mode 100644 index 000000000..b98499a45 --- /dev/null +++ b/internal/third_party/go-icu-regex/internal/icu/file.h @@ -0,0 +1,12 @@ +#include "unicode/regex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +UChar* replace(URegularExpression* regexp, UChar* replacement, int replacementLen, UChar* original, int originalSize, int start, int occurrence, int* returnSize); + + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/internal/third_party/go-icu-regex/internal/icu/icu.go b/internal/third_party/go-icu-regex/internal/icu/icu.go new file mode 100644 index 000000000..f76985bcd --- /dev/null +++ b/internal/third_party/go-icu-regex/internal/icu/icu.go @@ -0,0 +1,182 @@ +package icu + +// #cgo CXXFLAGS: -std=c++17 +// #cgo !windows LDFLAGS: -licui18n -licuuc -licudata +// #cgo icu_static CPPFLAGS: -DU_STATIC_IMPLEMENTATION +// #cgo windows,icu_static LDFLAGS: -lsicuin -lsicuuc -lsicudt +// #cgo windows,!icu_static LDFLAGS: -licuin -licuuc -licudt +// #include "unicode/uregex.h" +// #include +// #include "file.h" +import "C" + +import ( + "runtime" + "unicode/utf16" + "unsafe" +) + +type URegularExpression struct { + ptr *C.URegularExpression + cleanup runtime.Cleanup +} + +type UErrorCode C.UErrorCode + +func Uregex_open(str *UCharStr, flags uint32, uerr *UErrorCode) *URegularExpression { + res := new(URegularExpression) + var ec C.UErrorCode + res.ptr = C.uregex_open(str.ptr, C.int32_t(str.len), C.uint32_t(flags), nil, &ec) + if uerr != nil { + *uerr = UErrorCode(ec) + } + res.cleanup = runtime.AddCleanup(res, func(ptr *C.URegularExpression) { + C.uregex_close(ptr) + }, res.ptr) + return res +} + +func (re *URegularExpression) Free() { + re.cleanup.Stop() + C.uregex_close(re.ptr) +} + +func Uregex_start(regex *URegularExpression, group int, uerr *UErrorCode) (idx int32) { + var ec C.UErrorCode + res := C.uregex_start(regex.ptr, C.int32_t(group), &ec) + if uerr != nil { + *uerr = UErrorCode(ec) + } + return int32(res) +} + +func Uregex_end(regex *URegularExpression, group int, uerr *UErrorCode) (idx int32) { + var ec C.UErrorCode + res := C.uregex_end(regex.ptr, C.int32_t(group), &ec) + if uerr != nil { + *uerr = UErrorCode(ec) + } + return int32(res) +} + +func Uregex_find(regex *URegularExpression, startIndex int, uerr *UErrorCode) (ok bool) { + var ec C.UErrorCode + res := C.uregex_find(regex.ptr, C.int32_t(startIndex), &ec) + if uerr != nil { + *uerr = UErrorCode(ec) + } + return res != 0 +} + +func Uregex_findNext(regex *URegularExpression, uerr *UErrorCode) (ok bool) { + var ec C.UErrorCode + res := C.uregex_findNext(regex.ptr, &ec) + if uerr != nil { + *uerr = UErrorCode(ec) + } + return res != 0 +} + +func Uregex_setText(regex *URegularExpression, str *UCharStr, uerr *UErrorCode) { + var ec C.UErrorCode + C.uregex_setText(regex.ptr, str.ptr, C.int32_t(str.len), &ec) + if uerr != nil { + *uerr = UErrorCode(ec) + } +} + +func Replace(regex *URegularExpression, replacement string, original *UCharStr, start int, occurrence int) string { + var replacementStr UCharStr + replacementStr.SetString(replacement) + defer replacementStr.Free() + var res UCharStr + var resLen C.int + res.ptr = C.replace(regex.ptr, replacementStr.ptr, C.int(replacementStr.len), original.ptr, C.int(original.len), C.int(start), C.int(occurrence), &resLen) + res.len = int(resLen) + if res.ptr != original.ptr { + // replace will not allocate if there is no match, returning original instead. + // we return a non-owning reference here if that is the case, but need to take + // ownership of the storage if it is newly allocated for us. + res.cap = int(resLen) + } + defer res.Free() + return res.GetString() +} + +// A small wrapper around an allocated blob of memory and a populated *UChar. +type UCharStr struct { + ptr *C.UChar + len int + // If cap != 0, this UCharStr owns the ptr and is responsible for deallocating it. + cap int + + cleanup runtime.Cleanup +} + +func (s *UCharStr) SetString(str string) { + uints := utf16.Encode([]rune(str)) + sz := len(uints) + 1 + s.alloc(sz) + var i int + for i = 0; i < len(uints); i++ { + *(*C.UChar)(unsafe.Pointer(uintptr(unsafe.Pointer(s.ptr)) + uintptr(i)*C.sizeof_UChar)) = C.UChar(uints[i]) + } + *(*C.UChar)(unsafe.Pointer(uintptr(unsafe.Pointer(s.ptr)) + uintptr(i)*C.sizeof_UChar)) = C.UChar(0) + s.len = len(uints) +} + +func (s *UCharStr) GetString() string { + codeunits := make([]uint16, s.len) + for i := 0; i < s.len; i++ { + codeunits[i] = uint16(*(*C.UChar)(unsafe.Pointer(uintptr(unsafe.Pointer(s.ptr)) + uintptr(i)*C.sizeof_UChar))) + } + return string(utf16.Decode(codeunits)) +} + +func (s *UCharStr) GetSubstring(start, end int) string { + return s.slice(start, end).GetString() +} + +func (s *UCharStr) alloc(sz int) { + if sz < 64 { + sz = 64 + } + if sz > s.cap { + s.Free() + s.cap = NextPow2(sz) + s.ptr = (*C.UChar)(C.malloc(C.size_t(s.cap * C.sizeof_UChar))) + s.cleanup = runtime.AddCleanup(s, func(ptr *C.UChar) { + C.free(unsafe.Pointer(ptr)) + }, s.ptr) + } +} + +func (s *UCharStr) Free() { + if s.cap > 0 { + s.cleanup.Stop() + C.free(unsafe.Pointer(s.ptr)) + s.cap = 0 + s.ptr = nil + s.len = 0 + } +} + +func (s *UCharStr) slice(start, end int) *UCharStr { + // slice never owns the storage and must not outlive the owning *UCharStr, including a SetString called on it. + var res UCharStr + res.len = end-start + res.ptr = (*C.UChar)(unsafe.Pointer(uintptr(unsafe.Pointer(s.ptr)) + 2 * uintptr(start))) + return &res +} + +func NextPow2(i int) int { + ui := uint32(i) + ui-- + ui |= ui >> 1 + ui |= ui >> 2 + ui |= ui >> 4 + ui |= ui >> 8 + ui |= ui >> 16 + ui++ + return int(ui) +} diff --git a/internal/third_party/go-icu-regex/internal/icu/icu_test.go b/internal/third_party/go-icu-regex/internal/icu/icu_test.go new file mode 100644 index 000000000..1c6adc30e --- /dev/null +++ b/internal/third_party/go-icu-regex/internal/icu/icu_test.go @@ -0,0 +1,36 @@ +package icu + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNextPow2(t *testing.T) { + assert.Equal(t, 32, NextPow2(32)) + assert.Equal(t, 64, NextPow2(33)) +} + +func TestUCharStr(t *testing.T) { + var s UCharStr + defer s.Free() + assert.Equal(t, 0, s.len) + assert.Equal(t, 0, s.cap) + assert.Equal(t, "", s.GetString()) + s.SetString("hello, world!") + assert.Equal(t, 13, s.len) + assert.Equal(t, 64, s.cap) + assert.Equal(t, "hello, world!", s.GetString()) + s.SetString("hello, world! this is a longer string and it requires a reallocation. we just keep adding words until it is bigger than 64 characters.") + assert.Equal(t, 134, s.len) + assert.Equal(t, 256, s.cap) + assert.Equal(t, "hello, world! this is a longer string and it requires a reallocation. we just keep adding words until it is bigger than 64 characters.", s.GetString()) + s.SetString("hello, world!") + assert.Equal(t, 13, s.len) + assert.Equal(t, 256, s.cap) + assert.Equal(t, "hello, world!", s.GetString()) + + assert.Equal(t, "hello", s.GetSubstring(0,5)) + assert.Equal(t, "ello", s.GetSubstring(1,5)) + assert.Equal(t, "world", s.GetSubstring(7, 12)) +} diff --git a/internal/third_party/go-icu-regex/regex_icu.go b/internal/third_party/go-icu-regex/regex_icu.go new file mode 100644 index 000000000..20d2cbd33 --- /dev/null +++ b/internal/third_party/go-icu-regex/regex_icu.go @@ -0,0 +1,283 @@ +//go:build !windows + +// Copyright 2023 Dolthub, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package regex + +import ( + "context" + "fmt" + + "gopkg.in/src-d/go-errors.v1" + + "github.com/dolthub/go-icu-regex/internal/icu" +) + +// Regex is an interface that wraps around the ICU library, exposing ICU's regular expression functionality. It is +// imperative that Regex is closed once it is finished. +type Regex interface { + // SetRegexString sets the string that will later be matched against. This must be called at least once before any other + // calls are made (except for Close). + SetRegexString(ctx context.Context, regexStr string, flags RegexFlags) error + // SetMatchString sets the string that we will either be matching against, or executing the replacements on. This + // must be called after SetRegexString, but before any other calls. + SetMatchString(ctx context.Context, matchStr string) error + // IndexOf returns the index of the previously-set regex matching the previously-set match string. Must call + // SetRegexString and SetMatchString before this function. `endIndex` determines whether the returned index is at + // the beginning or end of the match. `start` and `occurrence` start at 1, not 0. Returns 0 if the index was not found. + IndexOf(ctx context.Context, start int, occurrence int, endIndex bool) (int, error) + // Matches returns whether the previously-set regex matches the previously-set match string. Must call + // SetRegexString and SetMatchString before this function. + Matches(ctx context.Context, start int, occurrence int) (bool, error) + // Replace returns a new string with the replacement string occupying the matched portions of the match string, + // based on the regex. Position starts at 1, not 0. Must call SetRegexString and SetMatchString before this function. + Replace(ctx context.Context, replacementStr string, position int, occurrence int) (string, error) + // Substring returns the match of the previously-set match string, using the previously-set regex. Must call + // SetRegexString and SetMatchString before this function. `start` and `occurrence` start at 1, not 0. + Substring(ctx context.Context, start int, occurrence int) (string, bool, error) + // Close frees up the internal resources. This MUST be called, else a panic will occur at some non-deterministic time. + Close() error +} + +var ( + // ErrRegexNotYetSet is returned when attempting to use another function before the regex has been initialized. + ErrRegexNotYetSet = errors.NewKind("SetRegexString must be called before any other function") + // ErrMatchNotYetSet is returned when attempting to use another function before the match string has been set. + ErrMatchNotYetSet = errors.NewKind("SetMatchString must be called as there is nothing to match against") + // ErrInvalidRegex is returned when an invalid regex is given + ErrInvalidRegex = errors.NewKind("the given regular expression is invalid") +) + +// RegexFlags are flags to define the behavior of the regular expression. Use OR (|) to combine flags. All flag values +// were taken directly from ICU. +type RegexFlags uint32 + +const ( + // Enable case insensitive matching. + RegexFlags_None RegexFlags = 0 + + // Enable case insensitive matching. + RegexFlags_Case_Insensitive RegexFlags = 2 + + // Allow white space and comments within patterns. + RegexFlags_Comments RegexFlags = 4 + + // If set, '.' matches line terminators, otherwise '.' matching stops at line end. + RegexFlags_Dot_All RegexFlags = 32 + + // If set, treat the entire pattern as a literal string. Metacharacters or escape sequences in the input sequence + // will be given no special meaning. + // + // The flag RegexFlags_Case_Insensitive retains its impact on matching when used in conjunction with this flag. The + // other flags become superfluous. + RegexFlags_Literal RegexFlags = 16 + + // Control behavior of "$" and "^". If set, recognize line terminators within string, otherwise, match only at start + // and end of input string. + RegexFlags_Multiline RegexFlags = 8 + + // Unix-only line endings. When this mode is enabled, only '\n' is recognized as a line ending in the behavior + // of ., ^, and $. + RegexFlags_Unix_Lines RegexFlags = 1 + + // Unicode word boundaries. If set, \b uses the Unicode TR 29 definition of word boundaries. Warning: Unicode word + // boundaries are quite different from traditional regular expression word boundaries. + // See http://unicode.org/reports/tr29/#Word_Boundaries + RegexFlags_Unicode_Word RegexFlags = 256 + + // Error on Unrecognized backslash escapes. If set, fail with an error on patterns that contain backslash-escaped + // ASCII letters without a known special meaning. If this flag is not set, these escaped letters represent + // themselves. + RegexFlags_Error_On_Unknown_Escapes RegexFlags = 512 +) + +// CreateRegex creates a Regex. |stringBufferInBytes| is a hint to allocate string buffers +// for a certain size to avoid reallocation in the future, but is currently unused by the +// primary implementation. +func CreateRegex(stringBufferInBytes uint32) Regex { + return &privateRegex{} +} + +// privateRegex is the private implementation of the Regex interface. +type privateRegex struct { + regexPtr *icu.URegularExpression + regexStr icu.UCharStr + matchStr icu.UCharStr + matchSet bool +} + +var _ Regex = (*privateRegex)(nil) + +// SetRegexString implements the interface Regex. +func (pr *privateRegex) SetRegexString(ctx context.Context, regexStr string, flags RegexFlags) (err error) { + if pr.regexPtr != nil { + pr.regexPtr.Free() + pr.regexPtr = nil + } + + pr.regexStr.SetString(regexStr) + pr.matchSet = false + + // Create the URegularExpression* + errorCode := icu.UErrorCode(0) + regex := icu.Uregex_open(&pr.regexStr, uint32(flags), &errorCode) + if errorCode > 0 { + return ErrInvalidRegex.New() + } + pr.regexPtr = regex + return nil +} + +// SetMatchString implements the interface Regex. +func (pr *privateRegex) SetMatchString(ctx context.Context, matchStr string) (err error) { + // Check for the regex pointer first + if pr.regexPtr == nil { + return ErrRegexNotYetSet.New() + } + + pr.matchStr.SetString(matchStr) + pr.matchSet = true + + // Set the text on the URegularExpression* + errorCode := icu.UErrorCode(0) + icu.Uregex_setText(pr.regexPtr, &pr.matchStr, &errorCode) + if errorCode > 0 { + return fmt.Errorf("unexpected UErrorCode from uregex_setText: %d", errorCode) + } + return nil +} + +// IndexOf implements the interface Regex. +func (pr *privateRegex) IndexOf(ctx context.Context, start int, occurrence int, endIndex bool) (int, error) { + // Check for the regex pointer first + if pr.regexPtr == nil { + return 0, ErrRegexNotYetSet.New() + } + + // Check that the match string has been set + if !pr.matchSet { + return 0, ErrMatchNotYetSet.New() + } + + // Look for a match + var errorCode icu.UErrorCode + ok := icu.Uregex_find(pr.regexPtr, start-1, &errorCode) + for i := 1; i < occurrence && ok; i++ { + ok = icu.Uregex_findNext(pr.regexPtr, &errorCode) + } + if !ok { + return 0, nil + } + + // Get the index of the match + var index int + if endIndex { + index32 := icu.Uregex_end(pr.regexPtr, 0, &errorCode) + index = int(index32) + } else { + index32 := icu.Uregex_start(pr.regexPtr, 0, &errorCode) + index = int(index32) + } + if errorCode > 0 { + return 0, fmt.Errorf("unexpected UErrorCode from uregex_find/uregex_findNext: %d", errorCode) + } + + return index + 1, nil +} + +// Matches implements the interface Regex. +func (pr *privateRegex) Matches(ctx context.Context, start int, occurrence int) (ok bool, err error) { + // Check for the regex pointer first + if pr.regexPtr == nil { + return false, ErrRegexNotYetSet.New() + } + + // Check that the match string has been set + if !pr.matchSet { + return false, ErrMatchNotYetSet.New() + } + + // Return if we found a match + var errorCode icu.UErrorCode + ok = icu.Uregex_find(pr.regexPtr, start, &errorCode) + for i := 1; i < occurrence && ok; i++ { + ok = icu.Uregex_findNext(pr.regexPtr, &errorCode) + } + if errorCode > 0 { + return false, fmt.Errorf("unexpected UErrorCode from uregex_find/uregex_findNext: %d", errorCode) + } + return ok, err +} + +// Replace implements the interface Regex. +func (pr *privateRegex) Replace(ctx context.Context, replacement string, start int, occurrence int) (replacedStr string, err error) { + // Check for the regex pointer first + if pr.regexPtr == nil { + return "", ErrRegexNotYetSet.New() + } + + // Check that the match string has been set + if !pr.matchSet { + return "", ErrMatchNotYetSet.New() + } + + return icu.Replace(pr.regexPtr, replacement, &pr.matchStr, start-1, occurrence), nil +} + +// Substring implements the interface Regex. +func (pr *privateRegex) Substring(ctx context.Context, start int, occurrence int) (string, bool, error) { + // Check for the regex pointer first + if pr.regexPtr == nil { + return "", false, ErrRegexNotYetSet.New() + } + + // Check that the match string has been set + if !pr.matchSet { + return "", false, ErrMatchNotYetSet.New() + } + + // Look for a match + var errorCode icu.UErrorCode + ok := icu.Uregex_find(pr.regexPtr, start-1, &errorCode) + for i := 1; i < occurrence && ok; i++ { + ok = icu.Uregex_findNext(pr.regexPtr, &errorCode) + } + if !ok { + return "", false, nil + } + + // Get the bounds of the match + idxStart := icu.Uregex_start(pr.regexPtr, 0, &errorCode) + idxEnd := icu.Uregex_end(pr.regexPtr, 0, &errorCode) + if errorCode > 0 { + return "", false, fmt.Errorf("unexpected UErrorCode from uregex_find/uregex_findNext: %d", errorCode) + } + + return pr.matchStr.GetSubstring(int(idxStart), int(idxEnd)), true, nil +} + +// Close implements the interface Regex. +func (pr *privateRegex) Close() (err error) { + if pr == nil { + return nil + } + if pr.regexPtr != nil { + pr.regexPtr.Free() + pr.regexPtr = nil + } + pr.matchStr.Free() + pr.regexStr.Free() + return nil +} diff --git a/internal/third_party/go-icu-regex/regex_test.go b/internal/third_party/go-icu-regex/regex_test.go new file mode 100644 index 000000000..4863e80aa --- /dev/null +++ b/internal/third_party/go-icu-regex/regex_test.go @@ -0,0 +1,203 @@ +// Copyright 2023 Dolthub, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package regex + +import ( + "context" + "sync" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestRegexpMatchLoop(t *testing.T) { + // Just test concurrency. + var wg sync.WaitGroup + wg.Add(16) + for i := 0; i < 16; i++ { + go func() { + defer wg.Done() + for i := 0; i < 2048; i++ { + TestRegexMatch(t) + } + }() + } + wg.Wait() +} + +func TestRegexMatch(t *testing.T) { + ctx := context.Background() + regex := CreateRegex(512 * 1024) + require.NoError(t, regex.SetRegexString(ctx, `abc+.*this st`, RegexFlags_None)) + err := regex.SetMatchString(ctx, "Find the abc in this string") + require.NoError(t, err) + ok, err := regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.True(t, ok) + err = regex.SetMatchString(ctx, "Find the abc in this here string") + require.NoError(t, err) + ok, err = regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.False(t, ok) + require.NoError(t, regex.Close()) + + regex = CreateRegex(11) + require.NoError(t, regex.SetRegexString(ctx, `[a-zA-Z0-9]{5} \w{4} aab`, RegexFlags_None)) + err = regex.SetMatchString(ctx, "Words like aab don't exist") + require.NoError(t, err) + ok, err = regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.True(t, ok) + + require.NoError(t, regex.SetRegexString(ctx, `^[aA]bcd[eE]$`, RegexFlags_None)) + err = regex.SetMatchString(ctx, "abcde") + require.NoError(t, err) + ok, err = regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.True(t, ok) + err = regex.SetMatchString(ctx, "Abcde") + require.NoError(t, err) + ok, err = regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.True(t, ok) + err = regex.SetMatchString(ctx, "AbcdE") + require.NoError(t, err) + ok, err = regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.True(t, ok) + require.NoError(t, regex.Close()) + + regex = CreateRegex(128) + require.NoError(t, regex.SetRegexString(ctx, `^abcde$`, RegexFlags_None)) + err = regex.SetMatchString(ctx, "abcde") + require.NoError(t, err) + ok, err = regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.True(t, ok) + err = regex.SetMatchString(ctx, "aBCDe") + require.NoError(t, err) + ok, err = regex.Matches(ctx, 0, 0) + require.NoError(t, err) + require.False(t, ok) + require.NoError(t, regex.Close()) +} + +func TestRegexReplace(t *testing.T) { + ctx := context.Background() + regex := CreateRegex(512 * 1024) + require.NoError(t, regex.SetRegexString(ctx, `[a-z]+`, RegexFlags_None)) + err := regex.SetMatchString(ctx, "abc def ghi") + require.NoError(t, err) + replacedStr, err := regex.Replace(ctx, "X", 1, 2) + require.NoError(t, err) + require.Equal(t, "abc X ghi", replacedStr) + replacedStr, err = regex.Replace(ctx, "X", 1, 3) + require.NoError(t, err) + require.Equal(t, "abc def X", replacedStr) + replacedStr, err = regex.Replace(ctx, "X", 1, 0) + require.NoError(t, err) + require.Equal(t, "X X X", replacedStr) + require.NoError(t, regex.Close()) +} + +func TestRegexIndexOf(t *testing.T) { + ctx := context.Background() + regex := CreateRegex(1024) + require.NoError(t, regex.SetRegexString(ctx, `[a-j]+`, RegexFlags_None)) + err := regex.SetMatchString(ctx, "abc def ghi") + require.NoError(t, err) + idx, err := regex.IndexOf(ctx, 1, 1, false) + require.NoError(t, err) + require.Equal(t, 1, idx) + idx, err = regex.IndexOf(ctx, 4, 1, false) + require.NoError(t, err) + require.Equal(t, 5, idx) + idx, err = regex.IndexOf(ctx, 8, 1, false) + require.NoError(t, err) + require.Equal(t, 9, idx) + idx, err = regex.IndexOf(ctx, 1, 2, false) + require.NoError(t, err) + require.Equal(t, 5, idx) + idx, err = regex.IndexOf(ctx, 1, 3, false) + require.NoError(t, err) + require.Equal(t, 9, idx) + idx, err = regex.IndexOf(ctx, 1, 4, false) + require.NoError(t, err) + require.Equal(t, 0, idx) + idx, err = regex.IndexOf(ctx, 1, 1, true) + require.NoError(t, err) + require.Equal(t, 4, idx) + idx, err = regex.IndexOf(ctx, 4, 1, true) + require.NoError(t, err) + require.Equal(t, 8, idx) + idx, err = regex.IndexOf(ctx, 8, 1, true) + require.NoError(t, err) + require.Equal(t, 12, idx) + idx, err = regex.IndexOf(ctx, 1, 2, true) + require.NoError(t, err) + require.Equal(t, 8, idx) + idx, err = regex.IndexOf(ctx, 1, 3, true) + require.NoError(t, err) + require.Equal(t, 12, idx) + idx, err = regex.IndexOf(ctx, 1, 4, true) + require.NoError(t, err) + require.Equal(t, 0, idx) + require.NoError(t, regex.SetMatchString(ctx, "klmno fghij abcde")) + idx, err = regex.IndexOf(ctx, 1, 1, false) + require.NoError(t, err) + require.Equal(t, 7, idx) + idx, err = regex.IndexOf(ctx, 1, 1, true) + require.NoError(t, err) + require.Equal(t, 12, idx) + require.NoError(t, regex.Close()) +} + +func TestRegexSubstring(t *testing.T) { + ctx := context.Background() + regex := CreateRegex(1024) + require.NoError(t, regex.SetRegexString(ctx, `[a-z]+`, RegexFlags_None)) + err := regex.SetMatchString(ctx, "abc def ghi") + require.NoError(t, err) + substr, ok, err := regex.Substring(ctx, 1, 1) + require.NoError(t, err) + require.True(t, ok) + require.Equal(t, "abc", substr) + substr, ok, err = regex.Substring(ctx, 4, 1) + require.NoError(t, err) + require.True(t, ok) + require.Equal(t, "def", substr) + substr, ok, err = regex.Substring(ctx, 8, 1) + require.NoError(t, err) + require.True(t, ok) + require.Equal(t, "ghi", substr) + substr, ok, err = regex.Substring(ctx, 1, 2) + require.NoError(t, err) + require.True(t, ok) + require.Equal(t, "def", substr) + substr, ok, err = regex.Substring(ctx, 1, 3) + require.NoError(t, err) + require.True(t, ok) + require.Equal(t, "ghi", substr) + substr, ok, err = regex.Substring(ctx, 1, 4) + require.NoError(t, err) + require.False(t, ok) + require.Equal(t, "", substr) + require.NoError(t, regex.SetMatchString(ctx, "ghx dey abz")) + substr, ok, err = regex.Substring(ctx, 1, 1) + require.NoError(t, err) + require.True(t, ok) + require.Equal(t, "ghx", substr) + require.NoError(t, regex.Close()) +} diff --git a/internal/third_party/go-icu-regex/regex_windows.go b/internal/third_party/go-icu-regex/regex_windows.go new file mode 100644 index 000000000..22bbedc00 --- /dev/null +++ b/internal/third_party/go-icu-regex/regex_windows.go @@ -0,0 +1,281 @@ +//go:build windows + +// Copyright 2023 Dolthub, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package regex + +import ( + "context" + "fmt" + "regexp" + + "gopkg.in/src-d/go-errors.v1" +) + +// Regex is an interface that wraps around the ICU library, exposing ICU's regular expression functionality. It is +// imperative that Regex is closed once it is finished. +type Regex interface { + // SetRegexString sets the string that will later be matched against. This must be called at least once before any other + // calls are made (except for Close). + SetRegexString(ctx context.Context, regexStr string, flags RegexFlags) error + // SetMatchString sets the string that we will either be matching against, or executing the replacements on. This + // must be called after SetRegexString, but before any other calls. + SetMatchString(ctx context.Context, matchStr string) error + // IndexOf returns the index of the previously-set regex matching the previously-set match string. Must call + // SetRegexString and SetMatchString before this function. `endIndex` determines whether the returned index is at + // the beginning or end of the match. `start` and `occurrence` start at 1, not 0. Returns 0 if the index was not found. + IndexOf(ctx context.Context, start int, occurrence int, endIndex bool) (int, error) + // Matches returns whether the previously-set regex matches the previously-set match string. Must call + // SetRegexString and SetMatchString before this function. + Matches(ctx context.Context, start int, occurrence int) (bool, error) + // Replace returns a new string with the replacement string occupying the matched portions of the match string, + // based on the regex. Position starts at 1, not 0. Must call SetRegexString and SetMatchString before this function. + Replace(ctx context.Context, replacementStr string, position int, occurrence int) (string, error) + // Substring returns the match of the previously-set match string, using the previously-set regex. Must call + // SetRegexString and SetMatchString before this function. `start` and `occurrence` start at 1, not 0. + Substring(ctx context.Context, start int, occurrence int) (string, bool, error) + // Close frees up the internal resources. This MUST be called, else a panic will occur at some non-deterministic time. + Close() error +} + +var ( + // ErrRegexNotYetSet is returned when attempting to use another function before the regex has been initialized. + ErrRegexNotYetSet = errors.NewKind("SetRegexString must be called before any other function") + // ErrMatchNotYetSet is returned when attempting to use another function before the match string has been set. + ErrMatchNotYetSet = errors.NewKind("SetMatchString must be called as there is nothing to match against") + // ErrInvalidRegex is returned when an invalid regex is given + ErrInvalidRegex = errors.NewKind("the given regular expression is invalid") +) + +// RegexFlags are flags to define the behavior of the regular expression. Use OR (|) to combine flags. All flag values +// were taken directly from ICU. +type RegexFlags uint32 + +const ( + // Enable case insensitive matching. + RegexFlags_None RegexFlags = 0 + + // Enable case insensitive matching. + RegexFlags_Case_Insensitive RegexFlags = 2 + + // Allow white space and comments within patterns. + RegexFlags_Comments RegexFlags = 4 + + // If set, '.' matches line terminators, otherwise '.' matching stops at line end. + RegexFlags_Dot_All RegexFlags = 32 + + // If set, treat the entire pattern as a literal string. Metacharacters or escape sequences in the input sequence + // will be given no special meaning. + // + // The flag RegexFlags_Case_Insensitive retains its impact on matching when used in conjunction with this flag. The + // other flags become superfluous. + RegexFlags_Literal RegexFlags = 16 + + // Control behavior of "$" and "^". If set, recognize line terminators within string, otherwise, match only at start + // and end of input string. + RegexFlags_Multiline RegexFlags = 8 + + // Unix-only line endings. When this mode is enabled, only '\n' is recognized as a line ending in the behavior + // of ., ^, and $. + RegexFlags_Unix_Lines RegexFlags = 1 + + // Unicode word boundaries. If set, \b uses the Unicode TR 29 definition of word boundaries. Warning: Unicode word + // boundaries are quite different from traditional regular expression word boundaries. + // See http://unicode.org/reports/tr29/#Word_Boundaries + RegexFlags_Unicode_Word RegexFlags = 256 + + // Error on Unrecognized backslash escapes. If set, fail with an error on patterns that contain backslash-escaped + // ASCII letters without a known special meaning. If this flag is not set, these escaped letters represent + // themselves. + RegexFlags_Error_On_Unknown_Escapes RegexFlags = 512 +) + +// CreateRegex creates a Regex. |stringBufferInBytes| is a hint to allocate string buffers +// for a certain size to avoid reallocation in the future, but is currently unused by the +// primary implementation. +func CreateRegex(stringBufferInBytes uint32) Regex { + return &privateRegex{} +} + +// privateRegex is the private implementation of the Regex interface for Windows. +type privateRegex struct { + re *regexp.Regexp + str string + sset bool + + done bool + start int + locs [][]int +} + +var _ Regex = (*privateRegex)(nil) + +// SetRegexString implements the interface Regex. +func (pr *privateRegex) SetRegexString(ctx context.Context, regexStr string, flags RegexFlags) (err error) { + _ = ctx + + // i : RegexFlags_Case_Insensitive + // m : RegexFlags_Multiline + // s : RegexFlags_Dot_All + // RegexFlags_Unix_Lines + var flg = "(?" + if flags&RegexFlags_Case_Insensitive != 0 { + flg += "i" + } + if flags&RegexFlags_Multiline != 0 { + flg += "m" + } + if flags&RegexFlags_Dot_All != 0 { + flg += "s" + } + if len(flg) > 2 { + flg += ")" + } else { + flg = "" + } + + if flags&RegexFlags_Literal != 0 { + regexStr = regexp.QuoteMeta(regexStr) + } + + pr.done = false + pr.sset = false + pr.re, err = regexp.Compile(flg + regexStr) + if err != nil { + return ErrInvalidRegex.New() + } + return nil +} + +// SetMatchString implements the interface Regex. +func (pr *privateRegex) SetMatchString(ctx context.Context, matchStr string) (err error) { + _ = ctx + if pr.re == nil { + return ErrRegexNotYetSet.New() + } + pr.done = false + pr.str = matchStr + pr.sset = true + return nil +} + +func (pr *privateRegex) do(start int) error { + if start < 1 { + start = 1 + } + if !pr.done || pr.start != start { + if pr.re == nil { + return ErrRegexNotYetSet.New() + } + if !pr.sset { + return ErrMatchNotYetSet.New() + } + pr.locs = pr.re.FindAllStringIndex(pr.str[start-1:], -1) + pr.start = start + pr.done = true + } + return nil +} + +func (pr *privateRegex) location(occurrence int) []int { + occurrence-- + if occurrence < 0 { + occurrence = 0 + } + if len(pr.locs) < occurrence+1 { + return nil + } + return pr.locs[occurrence] +} + +// IndexOf implements the interface Regex. +func (pr *privateRegex) IndexOf(ctx context.Context, start int, occurrence int, endIndex bool) (int, error) { + _ = ctx + err := pr.do(start) + if err != nil { + return 0, err + } + loc := pr.location(occurrence) + if loc == nil { + return 0, nil + } + pos := loc[0] + if endIndex { + pos = loc[1] + } + return pos + pr.start, nil +} + +// Matches implements the interface Regex. +func (pr *privateRegex) Matches(ctx context.Context, start int, occurrence int) (bool, error) { + _ = ctx + err := pr.do(start + 1) + if err != nil { + return false, err + } + loc := pr.location(occurrence) + return loc != nil, nil +} + +// Replace implements the interface Regex. +func (pr *privateRegex) Replace(ctx context.Context, replacement string, start int, occurrence int) (string, error) { + _ = ctx + err := pr.do(start) + if err != nil { + return "", err + } + + var locs [][]int + if occurrence == 0 { + locs = pr.locs + } else { + loc := pr.location(occurrence) + if loc != nil { + locs = [][]int{loc} + } + } + offs := pr.start - 1 + pos := offs + ret := []byte(pr.str[:pos]) + for _, loc := range locs { + ret = fmt.Appendf(ret, "%s%s", pr.str[pos:loc[0]+offs], replacement) + pos = loc[1] + offs + } + ret = fmt.Append(ret, pr.str[pos:]) + return string(ret), nil +} + +// Substring implements the interface Regex. +func (pr *privateRegex) Substring(ctx context.Context, start int, occurrence int) (string, bool, error) { + _ = ctx + err := pr.do(start) + if err != nil { + return "", false, err + } + loc := pr.location(occurrence) + if loc == nil { + return "", false, nil + } + return pr.str[loc[0]+pr.start-1 : loc[1]+pr.start-1], true, nil +} + +// Close implements the interface Regex. +func (pr *privateRegex) Close() (err error) { + pr.re = nil + pr.str = "" + pr.done = false + pr.locs = nil + return nil +} diff --git a/scripts/test.sh b/scripts/test.sh index d5f2c3ba8..c1f0a9cec 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -7,6 +7,17 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" SKIP_FILE="$REPO_ROOT/.test-skip" +# ICU4C is keg-only on macOS (Homebrew doesn't symlink it into /opt/homebrew). +# Dolt's go-icu-regex dependency needs these paths to compile and link. +if [[ "$(uname)" == "Darwin" ]]; then + ICU_PREFIX="$(brew --prefix icu4c 2>/dev/null || true)" + if [[ -n "$ICU_PREFIX" ]]; then + export CGO_CFLAGS="${CGO_CFLAGS:+$CGO_CFLAGS }-I${ICU_PREFIX}/include" + export CGO_CPPFLAGS="${CGO_CPPFLAGS:+$CGO_CPPFLAGS }-I${ICU_PREFIX}/include" + export CGO_LDFLAGS="${CGO_LDFLAGS:+$CGO_LDFLAGS }-L${ICU_PREFIX}/lib" + fi +fi + # Build skip pattern from .test-skip file build_skip_pattern() { if [[ ! -f "$SKIP_FILE" ]]; then