From 3e395e225143ce0493d5a7cdcd9058cdb8fd7062 Mon Sep 17 00:00:00 2001 From: Aaron Son Date: Mon, 15 Sep 2025 22:17:44 -0700 Subject: [PATCH] go.mod: Bump go-icu-regex. Pick up ICU4C Cgo dependency. From this commit, go-mysql-server takes a dependency on Cgo and a dependency on ICU4C. To depend on go-mysql-server CGO must be enabled, a C++ compiler must be available and the ICU4C development libraries must be available to the C++ compiler. On Windows, mingw with pacman -S icu is supported. On macOS, Homebrew installed icu4c works, but only if CGO_CPPFLAGS and CGO_LDFLAGS are set to point to the installed development libraries. On Linux, apt-get install libicu-dev, or similar. --- go.mod | 3 +-- go.sum | 8 ++----- sql/expression/function/regexp_init.go | 29 -------------------------- 3 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 sql/expression/function/regexp_init.go diff --git a/go.mod b/go.mod index f8f266adbd..604614c57d 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/dolthub/go-mysql-server require ( github.com/cespare/xxhash/v2 v2.2.0 github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 - github.com/dolthub/go-icu-regex v0.0.0-20250820171420-f2b78f56ce9f + github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 github.com/dolthub/vitess v0.0.0-20250915221346-753c44800850 @@ -34,7 +34,6 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/tetratelabs/wazero v1.9.0 // indirect golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect golang.org/x/mod v0.12.0 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect diff --git a/go.sum b/go.sum index 5695efef83..398e6216f3 100644 --- a/go.sum +++ b/go.sum @@ -12,14 +12,12 @@ github.com/denisenkom/go-mssqldb v0.10.0 h1:QykgLZBorFE95+gO3u9esLd0BmbvpWp0/waN github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= 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/go-icu-regex v0.0.0-20250820171420-f2b78f56ce9f h1:oSA8CptGeCEdTdD9LFtv8x4juDfdaLKsx1eocyaj1bE= -github.com/dolthub/go-icu-regex v0.0.0-20250820171420-f2b78f56ce9f/go.mod h1:kpsRG+a196Y69zsAFL0RkQICII9a571lcaxhvQnmrdY= +github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 h1:zxMsH7RLiG+dlZ/y0LgJHTV26XoiSJcuWq+em6t6VVc= +github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE= 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/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 h1:7/v8q9XGFa6q5Ap4Z/OhNkAMBaK5YeuEzwJt+NZdhiE= github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81/go.mod h1:siLfyv2c92W1eN/R4QqG/+RjjX5W2+gCTRjZxBjI3TY= -github.com/dolthub/vitess v0.0.0-20250902225707-0159e964d73d h1:oTWJxjzRmuHKuICUunCUwNuonubkXwOqPa5hXX3dXBo= -github.com/dolthub/vitess v0.0.0-20250902225707-0159e964d73d/go.mod h1:tV3BrIVyDWVkkYy8dKt2o6hjJ89cHb5opY5FpCyhncQ= github.com/dolthub/vitess v0.0.0-20250915221346-753c44800850 h1:QXkIRTquxaGUgKVHnKZxU+ikARdszUUDU6C9B/76+a0= github.com/dolthub/vitess v0.0.0-20250915221346-753c44800850/go.mod h1:tV3BrIVyDWVkkYy8dKt2o6hjJ89cHb5opY5FpCyhncQ= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -77,8 +75,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tetratelabs/wazero v1.9.0 h1:IcZ56OuxrtaEz8UYNRHBrUa9bYeX9oVY93KspZZBf/I= -github.com/tetratelabs/wazero v1.9.0/go.mod h1:TSbcXCfFP0L2FGkRPxHphadXPjo1T6W+CseNNY7EkjM= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= diff --git a/sql/expression/function/regexp_init.go b/sql/expression/function/regexp_init.go deleted file mode 100644 index 391637cd29..0000000000 --- a/sql/expression/function/regexp_init.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2025 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 function - -import ( - regex "github.com/dolthub/go-icu-regex" - "github.com/sirupsen/logrus" -) - -func init() { - // By default, the dolthub/go-icu-regex package will panic if a regex object is - // finalized without having the Dispose() method called. Instead of panicing, we - // add a RegexLeakHandler to log an error. - regex.SetRegexLeakHandler(func() { - logrus.Error("Detected leaked go-icu-regex.Regex instance") - }) -}