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: avoid using the term "work space" to refer to a GOPATH in documentation #48034

Open
vdepabk2t opened this issue Aug 28, 2021 · 2 comments
Open

Comments

@vdepabk2t
Copy link

@vdepabk2t vdepabk2t commented Aug 28, 2021

What is the URL of the page with the issue?

https://pkg.go.dev/cmd/go#hdr-Import_path_syntax

What is your user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36

Screenshot

pkg go dev-cmd-go-work-space

What did you do?

Read the page and tried to understand it.

The page says:

An import path (see 'go help packages') denotes a package stored in the local file system. In general, an import path denotes either a standard package (such as "unicode/utf8") or a package found in one of the work spaces (For more details see: 'go help gopath').

and:

Second, if you are compiling a Go program not in a work space, you can use a relative path in an import statement in that program to refer to nearby code also not in a work space. This makes it easy to experiment with small multipackage programs outside of the usual work spaces, but such programs cannot be installed with "go install" (there is no work space in which to install them), so they are rebuilt from scratch each time they are built. To avoid ambiguity, Go programs cannot use relative import paths within a work space.

What did you expect to see?

A description or definition of what a "work space" is. (I also looked in the output of go help gopath and didn't find it.)

What did you see instead?

No such description or definition.

From context, I'd guess a "work space" may be a directory (package? module???) in the local file system, possibly outside GOPATH; but I hate guessing. Besides, "Go programs cannot use relative import paths within a work space" seems to rule this out.

(Importance: very low; urgency: non-existent)

@gopherbot gopherbot added this to the Unreleased milestone Aug 28, 2021
@jba jba changed the title x/pkgsite: cmd/go: What is a "work space"? cmd/go: What is a "work space"? Aug 29, 2021
@jba jba removed the pkgsite label Aug 29, 2021
@Splizard
Copy link

@Splizard Splizard commented Aug 29, 2021

Related to #45713

@bcmills bcmills changed the title cmd/go: What is a "work space"? cmd/go: avoid using the term "work space" to refer to a GOPATH in documentation Aug 30, 2021
@bcmills
Copy link
Member

@bcmills bcmills commented Aug 30, 2021

I think this documentation dates back to near the introduction of GOPATH, and this “work space” refers to a directory listed in GOPATH. I agree that it is confusing in the context of modules.

CC @matloob @stevetraut @jayconrod

@bcmills bcmills removed this from the Unreleased milestone Aug 30, 2021
@bcmills bcmills added this to the Backlog milestone Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants