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: improve 'go work sync|use' error message when 'go.work' file is not present #50964

Closed
hyangah opened this issue Feb 2, 2022 · 1 comment
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Feb 2, 2022

$ go version
go1.18beta2

What did you do?

without creating go.work, ran other go work commands. (my bad)

What did you expect to see?

Error message indicating go.work or a work file isn't present.

What did you see instead?

% go1.18beta2 work sync
go: open : no such file or directory
% go1.18beta2 work use 
go: open : no such file or directory
% go1.18beta2 work use .
go: open : no such file or directory
% go1.18beta2 work edit 
go: no flags specified (see 'go help work edit').

minor: I noticed that go work sync downloads modules (or go mod tidy) even when there is no work file.

This is not a go1.18 release blocker.

cc @matloob

@bcmills bcmills added modules NeedsFix The path to resolution is known, but the work has not been done. labels Feb 2, 2022
@bcmills bcmills self-assigned this Feb 2, 2022
@bcmills bcmills added this to the Go1.18 milestone Feb 2, 2022
@gopherbot
Copy link

Change https://golang.org/cl/382246 mentions this issue: cmd/go: fail 'go work' subcommands with a more helpful error if no go.work file exists

@rsc rsc unassigned bcmills Jun 22, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
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

3 participants