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

go/build: Context.WorkingDir should just be Dir #36168

Closed
rsc opened this issue Dec 16, 2019 · 7 comments
Closed

go/build: Context.WorkingDir should just be Dir #36168

rsc opened this issue Dec 16, 2019 · 7 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Dec 16, 2019

CL 203820 introduced Context.WorkingDir but I don't see the API review anywhere.
It seems like it should just be "Dir".
We don't use the terminology "working dir" anywhere.

@rsc rsc added this to the Go1.14 milestone Dec 16, 2019
@rsc
Copy link
Contributor Author

rsc commented Dec 16, 2019

See also #36167.

@dmitshur
Copy link
Contributor

/cc @bcmills @jayconrod

@dmitshur dmitshur added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 16, 2019
@bcmills
Copy link
Contributor

bcmills commented Dec 17, 2019

I chose WorkingDir because Dir seemed a bit ambiguous, particularly given the ImportDir method. That said, I don't have a strong preference either way.

(@griesemer and @jayconrod reviewed the original CL.)

I'll send some changes to switch it to Dir.

@bcmills
Copy link
Contributor

bcmills commented Dec 17, 2019

FWIW, I think I had picked up the name WorkingDir from x/tools/internal/imports, introduced in CL 158437.

Note also https://tip.golang.org/cmd/internal/objabi/#WorkingDir.

Admittedly, both of those are in internal packages.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/211599 mentions this issue: internal/imports: set the Dir field on the build.Context (instead of WorkingDir) if present

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/211657 mentions this issue: go/build: rename WorkingDir to Dir

gopherbot pushed a commit to golang/tools that referenced this issue Dec 17, 2019
…WorkingDir) if present

Updates golang/go#36168

Change-Id: Ibdb277176a28da72d85a4c7c8ed7c903c278125e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211599
Run-TryBot: Bryan C. Mills <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Jay Conrod <[email protected]>
@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Dec 17, 2019
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/217124 mentions this issue: doc/go1.14: mention new field go/build.Context.Dir

gopherbot pushed a commit that referenced this issue Jan 31, 2020
Updates #34860
Updates #36168
Updates #36878

Change-Id: I484d7fea5d77d6dcd451d4fdffe0c450eed73636
Reviewed-on: https://go-review.googlesource.com/c/go/+/217124
Reviewed-by: Bryan C. Mills <[email protected]>
@golang golang locked and limited conversation to collaborators Jan 30, 2021
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants