setup-go should install non-git VCS binaries
See original GitHub issueMy project has a transitive test dependency on a bzr repo or two. It’s been a continual source of annoyance, and I haven’t been able to find a workaround so that developers can just use Go out of the box without installing bzr.
After invoking setup-go, and calling a go run
command, I see the following error:
> [line 0 : column 0] - loading files from package ".": go [list -f {{context.GOARCH}} {{context.Compiler}} -- unsafe]: exit status 1: go: labix.org/v2/mgo@v0.0.0-20140701140051-000000000287: bzr branch --use-existing-dir https://launchpad.net/mgo/v2 . in /home/runner/go/pkg/mod/cache/vcs/ca61c737a32b1e09a0919e15375f9c2b6aa09860cc097f1333b3c3d29e040ea8: exec: "bzr": executable file not found in $PATH
go: launchpad.net/gocheck@v0.0.0-20140225173054-000000000087: bzr branch --use-existing-dir https://launchpad.net/~niemeyer/gocheck/trunk . in /home/runner/go/pkg/mod/cache/vcs/f46ce2ae80d31f9b0a29099baa203e3b6d269dace4e5357a2cf74bd109e13339: exec: "bzr": executable file not found in $PATH
go: error loading module requirements
Specifically, the exec: "bzr": executable file not found in $PATH
piece indicates that bzr
is unavailable.
According to go help importpath
on go 1.12:
The vcs is one of “bzr”, “fossil”, “git”, “hg”, “svn”.
I don’t have any dependencies on fossil, hg, or svn, so I don’t know whether they’re available.
My redacted workflow file looks like:
on: push
jobs:
analyze:
name: analyze
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code
uses: actions/checkout@v1
- name: Build and run analyzer
run: GO111MODULE=on go run example.com/analyzer ./...
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Change log for 4.10.16
... Bug 2077411: for vsphere ipi add cluster domain to the uploaded vm configs so that 30-local-dns-prepender can use it #5827 ...
Read more >4.10.0-fc.4 - Release Status
4.10.0-fc.4. Download the installer for your operating system or run oc adm release extract --tools quay.io/openshift-release-dev/ocp-release: ...
Read more >wordlist_no_underscores.txt - Index of /
... doubly opencv2 spf13-vim-windows-install deformationbutton2 sharepointer ... fuguecoin quark jos-domain connectionworker listviewentry binary-packages ...
Read more >Untitled
Canadian single chart, Equazioni algebriche di quarto grado, Will cody and bailey get ... Stor drawer 311, Ali atienza wife, Monohull vs catamaran...
Read more >Manage your dotfiles across multiple diverse machines ...
With chezmoi, you can install chezmoi and your dotfiles on a new, ... only requires adding a single binary to your machine (which...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you use Go 1.12+ and modules you can use module proxy. Set GOPROXY env variable to https://proxy.golang.org. On 1.13 you don’t even have to do that as it’s the default.
Here’s a full example: https://onepage.nopub.io/p/Using-GitHub-Actions-with-Go-2ca9744b531f4f21bdae9976d1ccbb58#49a308c7-e5de-4c3d-85f0-c319464a0969
When using module proxy,
go
tool doesn’t usesgit
orbzr
to get the modules your project depends on but gets them from a caching proxy.I don’t think this should be the responsibility of this action. This action is responsible for pulling go install pkg, adding it to the path and setting up problem matchers. I also agree with @kjk