Skip to content

Commit

Permalink
Update tinygo version to v0.26.0 to fix version detection
Browse files Browse the repository at this point in the history
tinygo failed to detect the go version;

    tinygo_test.go:22: empty: tinygo build [build -o=nativebin .]; output: error: could not read version from GOROOT (/opt/hostedtoolcache/go/1.19.3/x64): Invalid go version output:
        // Code generated by go tool dist; DO NOT EDIT.

        package sys

        const StackGuardMultiplierDefault = 1

This was due to changes in go, and fixed in tinygo v0.23 and up:
tinygo-org/tinygo@e060e58

This version of tinygo requires go1.18 or up, so adding a build-constraint
for the test:

    tinygo_test.go:28: empty: tinygo [build -target=arduino-nano33 -o=arduino-nano33.bin .]
    tinygo_test.go:28: empty: tinygo build [build -target=arduino-nano33 -o=arduino-nano33.bin .];
    output: error: requires go version 1.18 through 1.19, got go1.14

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah authored and philhofer committed Dec 12, 2022
1 parent 0864514 commit ea4a7b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ travis:
if [ `arch` == 'x86_64' ]; then \
sudo apt-get -y -q update; \
sudo apt-get -y -q install build-essential; \
wget -q https://github.com/tinygo-org/tinygo/releases/download/v0.18.0/tinygo_0.18.0_amd64.deb; \
sudo dpkg -i tinygo_0.18.0_amd64.deb; \
wget -q https://github.com/tinygo-org/tinygo/releases/download/v0.26.0/tinygo_0.26.0_amd64.deb; \
sudo dpkg -i tinygo_0.26.0_amd64.deb; \
export PATH=$$PATH:/usr/local/tinygo/bin; \
fi
go get -d -t ./...
Expand Down
2 changes: 1 addition & 1 deletion tinygotest/tinygo_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build amd64 darwin
// +build amd64,go1.18 darwin,go1.18

package tinygotest

Expand Down

0 comments on commit ea4a7b2

Please sign in to comment.