I have recently tried to update to Nakama 2.7.0 to leverage the go 1.13 module support.
I ran into an issue after building the Golang shared object and trying to start Nakama.
I experienced the problem in a slightly bigger code base and started stripping things down until I had the smallest possible reproduction.
I got to the point where I made a new folder containing just the minimal example.
- Windows 10 64bit
- Nakama 2.7.0
- Plugin build image: heroiclabs/nakama-pluginbuilder:2.7.0
docker run --rm -v %cd%:/tempbuild -w /tempbuild heroiclabs/nakama-pluginbuilder:2.7.0 build --buildmode=plugin -trimpath -o ./modules/plugin_project.so
- Server running in standard docker-compose.yml with version 2.7.0 of Nakama
Using the 2.7.0 version of the plugin builder image I was unable to build the example out of the box. I believe this is due to commit fe4f8f0aa40aae7a5ce378f9e1a8c13f9f978433 where a few commands were removed form the build/pluginbuilder/Dockerfile Making it seemingly impossible to build without a go.mod file which brings in the necessary dependencies.
I believe it was mentioned in Gitter that the page is a bit outdated but I think mentioning the need for the go.mod with Nakama 2.7.0 and up would be very helpful.
This was resolved by running go mod init <module_name> in the root of the folder and rebuilding.
Running docker-compose up in the test folder where the docker-compose.yml is produces an output which I will attach as a file due to its size. nakama_golang_output.txt (20.3 KB)
Here is a screenshot of the folder structure, files and some of the more relevant contents. I tried to zip the folder and upload it but it is not a supported file type. Although it is just the nakama go example so I do not see how it could cause issues.
Needless to say server fails to start.