Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzzing rig interferes with go get installation #670

Closed
cortesi opened this issue Feb 24, 2021 · 2 comments
Closed

fuzzing rig interferes with go get installation #670

cortesi opened this issue Feb 24, 2021 · 2 comments

Comments

@cortesi
Copy link
Contributor

cortesi commented Feb 24, 2021

This command succeeds:

go get -u mvdan.cc/sh/v3@b1d056c32fce2c42d12f9342a454d8eb0d069625

This command, for the subsequent commit that revives the fuzzing rig, fails:

go get -u mvdan.cc/sh/v3@31a35be0acb24a89b8dc91f60f11a7d1fdcf3957               

mvdan.cc/sh/v3: no Go source files
package mvdan.cc/sh/v3: build constraints exclude all Go files in /home/cortesi/go/pkg/mod/mvdan.cc/sh/v3@v3.3.0-0.dev.0.20201102111809-31a35be0acb2

I see the same error for master.

I haven't had time to dig into this completely, but the issue is related to the +build gofuzz directive in the fuzz.go file, and might be fixed by this recent commit in the Go project:

https://go-review.googlesource.com/c/go/+/289769/

See further discussion here:

golang/go#29268 (comment)

@mvdan
Copy link
Owner

mvdan commented Feb 24, 2021

You should be using go get -d to update dependencies. I believe -d will become a default in a future Go release. Otherwise, you're building the package at that path, which rarely makes sense; you could just use go build or go install for that.

I guess I could move the fuzz files elsewhere, like in the syntax package, but I still reckon that this is not a bug :)

@cortesi
Copy link
Contributor Author

cortesi commented Feb 24, 2021

Ah, my apologies - I was sure I checked this. I see -d also outputs the "no Go source files" warning, so I must have assumed the command had failed when it had actually updated the module. I guess this will become nicer in a future release of Go. This solves my problem, so I'll close this issue.

@cortesi cortesi closed this as completed Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants