go subrepos moving to golang.org/x/subrepo

387 views
Skip to first unread message

Russ Cox

unread,
Aug 18, 2014, 7:31:19 PM8/18/14
to golang-dev
golang.org/s/go14subrepo.
comments welcome here (except those suggesting a different path)


Caleb Spare

unread,
Aug 18, 2014, 7:42:44 PM8/18/14
to Russ Cox, golang-dev
Hi Russ,

In this document you refer to golang.org/s/go14customdomain but I
think that's supposed to be golang.org/s/go14customimport.

Does 'x' stand for something?

-Caleb

On Mon, Aug 18, 2014 at 4:31 PM, Russ Cox <r...@golang.org> wrote:
> golang.org/s/go14subrepo.
> comments welcome here (except those suggesting a different path)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Russ Cox

unread,
Aug 18, 2014, 8:19:18 PM8/18/14
to Caleb Spare, golang-dev
On Mon, Aug 18, 2014 at 7:42 PM, Caleb Spare <ces...@gmail.com> wrote:
Hi Russ,

In this document you refer to golang.org/s/go14customdomain but I
think that's supposed to be golang.org/s/go14customimport.

Thanks, fixed.
 
Does 'x' stand for something?

It can stand for whatever you like. I have heard both 'extra' and 'exported'.

Russ

Konstantin Kulikov

unread,
Aug 19, 2014, 8:17:37 AM8/19/14
to golan...@googlegroups.com
This doen't include github.com/golang repo, right? Why not?

Andrew Gerrand

unread,
Aug 19, 2014, 8:21:56 AM8/19/14
to Konstantin Kulikov, golang-dev
One thing at a time.


Aram Hăvărneanu

unread,
Aug 19, 2014, 9:38:07 AM8/19/14
to Andrew Gerrand, Konstantin Kulikov, golang-dev
Will golang.org serve subrepo documentation?

If yes, what will be the url? Going by the rules, and after pkg
trimming, it should be golang.org/golang.org/x/foo. That is ugly, I
imagine we will special-case it to golang.org/x/foo?

--
Aram Hăvărneanu

Russ Cox

unread,
Aug 19, 2014, 9:45:03 AM8/19/14
to Aram Hăvărneanu, Andrew Gerrand, Konstantin Kulikov, golang-dev
golang.org has never served subrepo documentation. I think godoc.org is working well for that.
We haven't worked out the details but one option is to make http://golang.org/x/foo/bar (which must exist for the import to work) serve the necessary metadata and an html redirect to the godoc.org page.
This is what I do for rsc.io/pdf, for example:

<head>
<meta http-equiv="refresh" content="0; URL='http://godoc.org/rsc.io/pdf'">
<meta name="go-import" content="rsc.io/pdf git https://github.com/rsc/pdf">
</head>
g% 

Russ

Aram Hăvărneanu

unread,
Aug 19, 2014, 9:55:53 AM8/19/14
to Russ Cox, Andrew Gerrand, Konstantin Kulikov, golang-dev
I apologise for asking something you said not to ask in your first
post, but I must.

If there are no plans to serve subrepo documentation, what's the point
of x in the import paths? Specifically, why golang.org/x/foo instead
of the simpler golang.org/foo?

The potential name clash in the documentation is avoided by not
presenting subrepo documentation at all (e.g. golang.org/net prints
net docs, not go.net docs), and the import paths are unique (e.g. net
is the stdlib net, golang.org/net is go.net).

I agree there's a subtle confusion: golang.org/net will show stdlib
documentation and at the same time it must print go.net meta tags. Is
that the reason for x?

--
Aram Hăvărneanu

Russ Cox

unread,
Aug 19, 2014, 10:01:01 AM8/19/14
to Aram Hăvărneanu, Andrew Gerrand, Konstantin Kulikov, golang-dev
You are confused. golang.org/net is a 404. golang.org/x gives much better scoping than golang.org/. It carves out a piece of the URL space instead of claiming all of it.

Russ

Aram Hăvărneanu

unread,
Aug 19, 2014, 10:03:49 AM8/19/14
to Russ Cox, Andrew Gerrand, Konstantin Kulikov, golang-dev
On Tue, Aug 19, 2014 at 5:00 PM, Russ Cox <r...@golang.org> wrote:
> You are confused. golang.org/net is a 404

Yes, now it is. I have assumed that since we move the packages out of
src/pkg, we will want to remove /pkg from URLs too (perhaps leaving a
redirect).

> golang.org/x gives much better scoping than golang.org/.
> It carves out a piece of the URL space instead of claiming all of it.

Ok.

--
Aram Hăvărneanu

Russ Cox

unread,
Aug 19, 2014, 2:09:17 PM8/19/14
to Aram Hăvărneanu, Andrew Gerrand, Konstantin Kulikov, golang-dev
On Tue, Aug 19, 2014 at 10:03 AM, Aram Hăvărneanu <ara...@mgk.ro> wrote:
On Tue, Aug 19, 2014 at 5:00 PM, Russ Cox <r...@golang.org> wrote:
> You are confused. golang.org/net is a 404

Yes, now it is. I have assumed that since we move the packages out of
src/pkg, we will want to remove /pkg from URLs too (perhaps leaving a
redirect).

No. I've answered this before. golang.org/pkg is where the docs are served because in $GOROOT /pkg is where the binaries are.

The /src/pkg/ URLs will become /src/ but the /pkg/ URLs will stay /pkg/.

Russ
Reply all
Reply to author
Forward
0 new messages