From 21ba9392e2db1d2df4b14951ae25d4c6d0496fe8 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 5 Jun 2020 00:39:59 +0200 Subject: [PATCH] ci: support Go modules Since TinyGo started supporting Go modules, there was an error in CI. The commit 7967e82fed423c98e913fc340b5369edc0c4489c tries to fix that, but I think the underlying issue is that we're checking out in GOROOT, which is definitely not a supported configuration. I think the best solution is to just switch to using Go modules, by adding a go.mod file in the root. I've set it to Go version 1.13 as that is the first Go version that supports number literals, but it could be set to any supported Go version (1.11-1.14). Since we use Go modules, the location of the drivers checkout should not matter so I've removed it. This fixes the error on CircleCI. --- .circleci/config.yml | 1 - go.mod | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 go.mod diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d8119a..67f7497 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,6 @@ jobs: build: docker: - image: tinygo/tinygo-dev - working_directory: /usr/local/go/src/vendor/tinygo.org/x/drivers steps: - checkout - run: tinygo version diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..615a042 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module tinygo.org/x/drivers + +go 1.13