I’m developing my first step using Go instead of Bash, so I don’t really know enough to understand this stacktrace. The test step ran yesterday with a default main.go
, but now it’s not working after I’ve modified it. Not getting any red squigglies in my IDE (Goland), but I have added some new dependencies:
When I run bitrise run test
now in my step’s root dir, I’m getting the following error:
+------------------------------------------------------------------------------+
| (2) Step Test |
+------------------------------------------------------------------------------+
| id: ./ |
| version: |
| collection: path |
| toolkit: go |
| time: 2021-12-22T19:41:28-08:00 |
+------------------------------------------------------------------------------+
| |
INFO[19:41:28] Start installing (git) with apt-get
INFO[19:41:28] * [OK] Step dependency (git) installed, available.
INFO[19:41:28] Start installing (wget) with apt-get
INFO[19:41:28] * [OK] Step dependency (wget) installed, available.
INFO[19:41:28] Start installing (python3) with apt-get
INFO[19:41:28] * [OK] Step dependency (python3) installed, available.
INFO[19:41:28] Start installing (apt-transport-https) with apt-get
INFO[19:41:28] * [OK] Step dependency (apt-transport-https) installed, available.
INFO[19:41:28] Start installing (ca-certificates) with apt-get
INFO[19:41:28] * [OK] Step dependency (ca-certificates) installed, available.
INFO[19:41:28] Start installing (gnupg) with apt-get
INFO[19:41:28] * [OK] Step dependency (gnupg) installed, available.
ERRO[19:41:28] Step (Step Test) failed: Failed to prepare the step for execution through the required toolkit (go), error: failed to build Step in directory (/tmp/bitrise623849627/step_src): command `/usr/local/go/bin/go "build" "-mod=vendor" "-o" "/home/dphillips/.bitrise/toolkits/go/cache/path-._-"` failed, output: main.go:5:2: cannot find package "." in:
/tmp/bitrise623849627/step_src/vendor/github.com/bitrise-io/go-utils/filedownloader
main.go:6:2: cannot find package "." in:
/tmp/bitrise623849627/step_src/vendor/github.com/bitrise-io/go-utils/fileutil
| |
+---+---------------------------------------------------------------+----------+
| x | Step Test (exit code: 1) | 0.27 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...indrllc/bitrise-step-run-tests-in-firebase-test-lab/issues |
| Source: .../github.com/grindrllc/bitrise-step-run-tests-in-firebase-test-lab |
+---+---------------------------------------------------------------+----------+
I did run go get github.com/bitrise-io/go-utils/fileutil
in my step dir to download your go-utils module.After doing that, Goland stopped complaining about the missing module, and I assume i’ve properly installed the go-utils module (it appears to be at ~/go/pkg/mod/github.com/bitrise.io/go-utils).
I’ve installed Go 1.17.5 into my Ubuntu WSL environment after downloading it from the go website. Though I think yesterday when everything ran fine, I was using the older version of go from the Ubuntu repos.
Any help is greatly appreciated! I’m surely missing something simple.