dolthub / go-mysql-server

A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.
Apache License 2.0
2.33k stars 201 forks source link

Update flatbuffers to fix go-mysql-server builds in Bazel environments #2514

Open sfc-gh-mbojanczyk opened 4 months ago

sfc-gh-mbojanczyk commented 4 months ago

Synopsis

go-mysql-server v0.16.0+ fails to build in a Bazel build environment due to an issue with the dolthub flatbuffers fork. An updated flatbuffers release should fix this.

Request

To fix go-mysql-server's builds in Bazel environments, can you please do the following?

  1. Create a release of the forked flatbuffers repo to capture this PR
  2. Update the import of flatbuffers in go-mysql-server's go.mod

Root Cause

Around the v.0.16.0 release, go-mysql-server switched to using a forked version of flatbuffers instead of Google's upstream version. At this point, builds of go-mysql-server would start to fail if built under Bazel with the following error message:

github_dolthub_go_mysql_server/sql/mysql_db/serial/mysql_db.go: import of "github.com/dolthub/flatbuffers/v23/go"
No dependencies were provided.

This appears to stem from an oversight during the fork in which the import path directive was not updated. This was fixed in a subsequent PR, but the last forked flatbuffers release was done prior to the patch.

A new release of flatbuffers to capture the importpath fix should allow go-mysql-server to build under Bazel again.

xiehuc commented 3 weeks ago

in your repository,

go get github.com/dolthub/flatbuffers/v23@master would fix bazel build