talent-plan / tinysql

A course to build the SQL layer of a distributed database.
Apache License 2.0
1.7k stars 519 forks source link

Non-issue: allow user to custom "go" command in makefile #146

Open hidehalo opened 2 years ago

hidehalo commented 2 years ago

TinySQL require "go" version 1.13.

I can't install go@1.13 via "Homebrew" on my laptop, cauz it's abandoned at upstream.

Since that, I must download go@1.13 manually from "go" website.

The point is, a lots user work on go version > 1.13, they must have multiple go versions executable command.

We should allow user to custom "go" command in "Makefile".

eg:

# which go@1.13
go@1.13 version
go version go1.13.15 darwin/amd64

# which go@1.18
go version
go version go1.18.3 darwin/amd64

# env variable `GOCMD` use `go@1.13` replace to `go@1.18`
GOCMD=go@1.13 make test-proj1
cd tablecodec && \
    go@1.13 test

# no specific `GOCMD` is fine, we would use default command "go"
 make test-proj1
 cd tablecodec && \
    go test
hidehalo commented 2 years ago

@winoros @yanguwan PTAL, thx!