Skip to content

Commit 2318e83

Browse files
committed
README,internal/regex: Update documentation around gms_pure_go tag. Make gms_pure_go tag required to build against non-compatible Regex implementation.
1 parent 44bc96e commit 2318e83

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,19 @@ go get github.com/dolthub/go-mysql-server@latest
5757
```
5858

5959
To implement ICU-compatible regexes, `go-mysql-server` has a dependency on
60-
[go-icu-regex](github.com/dolthub/go-icu-regex), which has a cgo dependency on
60+
[go-icu-regex](github.com/dolthub/go-icu-regex), which has a Cgo dependency on
6161
[ICU4C](https://unicode-org.github.io/icu/userguide/icu4c/). To build a project
6262
which depends on `go-mysql-server`, you should have a C/C++ toolchain, you
6363
should build with Cgo enabled, and you should have libicu-dev, or the
6464
equivalent for your environment, installed and available to your C++ toolchain.
6565

66+
For convenience, `go-mysql-server` also includes a non-compatible regex
67+
implementation based on the Go standard library `regex.Regex`. To build against
68+
that, instead of the `go-icu-regex` implementation, you must compile with
69+
`-tags=gms_pure_go`. Please note that some of go-mysql-server's tests do not
70+
pass with `-tags=gms_pure_go` and in general `gms_pure_go` is not recommended
71+
for users seeking MySQL compatibility.
72+
6673
## Using the in-memory test server
6774

6875
The in-memory test server can replace a real MySQL server in

internal/regex/regex_pure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !cgo || gms_pure_go
1+
//go:build gms_pure_go
22

33
package regex
44

0 commit comments

Comments
 (0)