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

cmd/go: use quiet flag to allow tool integrations with Go modules #26628

Closed
marwan-at-work opened this issue Jul 26, 2018 · 4 comments
Closed
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@marwan-at-work
Copy link
Contributor

marwan-at-work commented Jul 26, 2018

What version of Go are you using (go version)?

Tip - Darwin

What did you do?

go list -m -versions -json github.com/pkg/errors@latest to list all the available upstream versions

What did you expect to see?

I'd like to only get the JSON output and not mod-fetching output.
The boolean QuietLookup in modfetch/cache.go is not being set anywhere which is causing the following to show

What did you see instead?

go: finding github.com/pkg/errors v0.8.0
{
	"Path": "github.com/pkg/errors",
	"Version": "v0.8.0",
	"Versions": [
		"v0.1.0",
		"v0.2.0",
		"v0.3.0",
		"v0.4.0",
		"v0.5.0",
		"v0.5.1",
		"v0.6.0",
		"v0.7.0",
		"v0.7.1",
		"v0.8.0"
	],
	"Time": "2016-09-29T01:48:01Z"
}
@oiooj
Copy link
Member

oiooj commented Jul 28, 2018

I think "go list -m" always need QuietLookup = true, maybe we don't need a quiet flag.

@myitcv
Copy link
Member

myitcv commented Jul 31, 2018

Please can you confirm the full env details here (you've abbreviated the template) - what commit were you using etc?

I can't reproduce the issue you're seeing based on the steps above either.

In any case, stdout should always contain valid JSON, per #26218 (comment)

@marwan-at-work
Copy link
Contributor Author

@myitcv I believe I was parsing both stderr and stdout, so I'll try again with just stdout and it should probably work. That being said, maybe the CL is still ok to have control over the QuietLookup variable in cache. Otherwise, using stdout is fine for my usecase. Thanks

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Aug 3, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Aug 3, 2018
@myitcv
Copy link
Member

myitcv commented Aug 7, 2018

@marwan-at-work - I'm going to close per #26628 (comment), but please shout if you're seeing behaviour contrary to #26218 (comment)

@myitcv myitcv closed this as completed Aug 7, 2018
@golang golang locked and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants