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 install foo/bar/... should also install foo/bar if it is a package #3110

Closed
alberts opened this issue Feb 23, 2012 · 8 comments
Closed

Comments

@alberts
Copy link
Contributor

alberts commented Feb 23, 2012

What steps will reproduce the problem?

We have the following package structure:

foo/bar
foo/bar/server
foo/bar/util
foo/baz/server
foo/baz/util
foo/quux
foo/quux/server
foo/quux/util

In this example, our foo/bar package contains client API for foo/bar/server, so it's not
an empty directory.

go install foo/bar/... doesn't build foo/bar, which means I have to type go install
foo/bar foo/bar/..., which is quite cumbersome.

The importpath doc says:

Doc says: "For example, encoding/... expands to all packages in the
encoding tree." I would assume that includes encoding too, if there is a package
there.

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g

Which operating system are you using?

linux

Which revision are you using?  (hg identify)

tip
@bytbox
Copy link
Contributor

bytbox commented Feb 23, 2012

Comment 1:

This appears to be a deliberate change made in r11599.

@alberts
Copy link
Contributor Author

alberts commented Feb 23, 2012

Comment 2:

changeset:   11599:114d4a5394e0
user:        Brad Fitzpatrick <bradfitz@golang.org>
date:        Fri Feb 03 11:43:24 2012 -0800
summary:     test: don't use package main for files without a main function
doesn't seem to touch this code?

@bytbox
Copy link
Contributor

bytbox commented Feb 23, 2012

Comment 3:

Oh, I HATE mercurial...
This one:
changeset:   11599:5d852698cb0f
user:        Russ Cox <rsc@golang.org>
date:        Tue Jan 31 17:40:36 2012 -0500
summary:     cmd/go: improvements
So 5d852698cb0f. The CL is http://golang.org/cl/5604048/
Sorry about that.

@remyoudompheng
Copy link
Contributor

Comment 4:

the syntax is foo/bar...  Withtou a slash, also foo/ba... Should work.

@alberts
Copy link
Contributor Author

alberts commented Feb 23, 2012

Comment 5:

Thanks. It might help to include an additional example illustrating this in go help
importpath. I assumed that you could only put ... after /

@robpike
Copy link
Contributor

robpike commented Feb 26, 2012

Comment 6:

Labels changed: added priority-go1, go1-must, documentation, removed priority-triage.

@robpike
Copy link
Contributor

robpike commented Feb 26, 2012

Comment 8:

Owner changed to builder@golang.org.

@robpike
Copy link
Contributor

robpike commented Feb 26, 2012

Comment 9:

This issue was closed by revision b49dcb9.

Status changed to Fixed.

@rsc rsc added this to the Go1 milestone Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants