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: go work use $DIR adds different paths from go work init $DIR #51449

Closed
bcmills opened this issue Mar 3, 2022 · 3 comments
Closed

cmd/go: go work use $DIR adds different paths from go work init $DIR #51449

bcmills opened this issue Mar 3, 2022 · 3 comments
Labels
FrozenDueToAge modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. release-blocker
Milestone

Comments

@bcmills
Copy link
Member

bcmills commented Mar 3, 2022

Both go work use and go work init can be used to add paths to a go.work file. However, the paths that they add differ in whether they include a ./ prefix.

We should figure out which form they should canonically use and update them to match.

~/src/golang.org/x/exp$ gotip version
go version devel go1.19-6da16b6ad Tue Mar 1 23:49:01 2022 +0000 linux/amd64

~/src/golang.org/x/exp$ gotip work init shiny/

~/src/golang.org/x/exp$ cat go.work
go 1.19

use ./shiny

~/src/golang.org/x/exp$ rm go.work

~/src/golang.org/x/exp$ gotip work init

~/src/golang.org/x/exp$ go work use shiny/

~/src/golang.org/x/exp$ cat go.work
go 1.19

use shiny

CC @matloob

@bcmills bcmills added modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. release-blocker labels Mar 3, 2022
@bcmills bcmills added this to the Go1.18 milestone Mar 3, 2022
@matloob
Copy link
Contributor

matloob commented Mar 4, 2022

This is fixed in https://go-review.googlesource.com/c/go/+/389854, which is being cherry-picked onto the release branch in https://go-review.googlesource.com/c/go/+/389298.

@dmitshur
Copy link
Contributor

dmitshur commented Mar 4, 2022

@matloob In that case, can this release-blocking issue be closed in favor of #51448 (also a release blocking issue, the one that will be marked closed when CL 389298 lands on release-branch.g1.18)? Thanks.

@bcmills
Copy link
Member Author

bcmills commented Mar 4, 2022

Yeah, I kind of smooshed the two fixes into one CL and forgot to refer to both issues. Let's go ahead and close this one, since it's fixed at head and in the backport stack.

@bcmills bcmills closed this as completed Mar 4, 2022
gopherbot pushed a commit to golang/website that referenced this issue Mar 31, 2022
the first change is related to: golang/go#51449

Change-Id: I857d412a5082b142bb54d7fab685d298488376f9
GitHub-Last-Rev: e19bc97
GitHub-Pull-Request: #136
Reviewed-on: https://go-review.googlesource.com/c/website/+/389638
Reviewed-by: Michael Matloob <matloob@google.com>
Trust: Michael Matloob <matloob@google.com>
Trust: Ian Lance Taylor <iant@google.com>
passionSeven added a commit to passionSeven/website that referenced this issue Oct 18, 2022
the first change is related to: golang/go#51449

Change-Id: I857d412a5082b142bb54d7fab685d298488376f9
GitHub-Last-Rev: e19bc97f9bfe5d64213af262a8c1d744cddedca8
GitHub-Pull-Request: golang/website#136
Reviewed-on: https://go-review.googlesource.com/c/website/+/389638
Reviewed-by: Michael Matloob <matloob@google.com>
Trust: Michael Matloob <matloob@google.com>
Trust: Ian Lance Taylor <iant@google.com>
@golang golang locked and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants