Skip to content

cmd/go: go.work outside /src directory is not respected in /src #52084

@hyangah

Description

@hyangah

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

$ pwd
/Users/hakim/go_tip/go/src 
$ ../bin/go version
go version devel go1.19-fd653913be Thu Mar 31 13:59:09 2022 -0400 darwin/amd64

What did you do?

$  cat ../go.work
go 1.18

use (
	./src
	./src/cmd
)
$ ../bin/go env GOWORK GOROOT

/Users/hakim/go_tip/go
$ ../bin/go list -m
std

What did you expect to see?

go.work is respected.

What did you see instead?

go.work outside std is not respected.

cc @matloob @bcmills

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions