[ 
https://issues.apache.org/jira/browse/PROTON-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16942919#comment-16942919
 ] 

Alan Conway edited comment on PROTON-2105 at 10/2/19 4:04 PM:
--------------------------------------------------------------

Yep, I started looking at that before I was dragged off elsewhere. There's a 
history of my blunders here:
 # The directory layout is wrong: `proton/go/src/qpid.apache.org/....` is laid 
out like a workspace, not a project. Classic newbie mistake by me long ago and 
never corrected.
 # The qpid.apache.org/... illusion is created by a "magic" go1 branch, and 
some redirecting metadata tags on the qpid.apache.org website. The release 
process to update the go1 branch is explained here: 
[https://github.com/apache/qpid-proton/blob/master/go/src/qpid.apache.org/readme-go-get.md|https://github.com/apache/qpid-proton/blob/master/go/src/qpid.apache.org/readme-go-get.md#L1]

The magic go1 branch and HTTP redirect is nowadays deprecated in favour of 
modules, we should get rid of it. We have to change the package names, so we 
want to get it right the first time :) 

First re-organize the directory tree to be `proton/go/pkg/...` - as we're 
changing package name we should take the chance to clean up.

Now  go/go.mod is simply:
{code}
module github.com/apache/qpid-proton/go
go 1.12
{code}
(I wouldn't jump straight to 1.13, lots of distros are still on 1.12 including 
Fedora 30)

The import names will be "github.com/apache/qpid-proton/go/pkg/electron" etc.

I would do all of the above in a single release cycle and leave the 
qpid.apache.org redirect stuck at the current release. That way existing users 
won't be broken, new users use the new names.

It is possible we could make the qpid.apache.org/... names continue to work, 
but I think it's better to make a clean break. The redirect-via-website is 
bewildering compared to the straightforward "package-name-equals-git-repo" 
convention which allows developers to easily find the source code, godocs etc.


was (Author: aconway):
Yep, I started looking at that before I was dragged off elsewhere. There's a 
history of my blunders here:
 # The directory layout is wrong: `proton/go/src/qpid.apache.org/....` is laid 
out like a workspace, not a project. Classic newbie mistake by me long ago and 
never corrected.
 # The qpid.apache.org/... illusion is created by a "magic" go1 branch, and 
some redirecting metadata tags on the qpid.apache.org website. The release 
process to update the go1 branch is explained here: 
[https://github.com/apache/qpid-proton/blob/master/go/src/qpid.apache.org/readme-go-get.md|https://github.com/apache/qpid-proton/blob/master/go/src/qpid.apache.org/readme-go-get.md#L1]

The magic go1 branch and HTTP redirect is nowadays deprecated in favour of 
modules, we should get rid of it. We have to change the package names, so we 
want to get it right the first time :) 

Steps:
 # Re-organize the directory tree to be `proton/go/pkg/...` otherwise we'll 
have horrid long package names.
 # Pick a hostname: github.com or gitbox.apache.org. It's a political decision 
- github is more visible, but someone should check if apache policy requires 
the word "apache" in the "official" package names. I'm staying out of it.
 # Once the decision is made it's easy - assuming we choose github and 
re-organize the directories as above it would be:

{code:java}
module github.com/qpid-proton/go/ 
go 1.12
{code}
(I wouldn't jump straight to 1.13, lots of distros are still on 1.12 including 
Fedora 30)

I would do all of the above in a single release cycle and leave the 
qpid.apache.org redirect stuck at the current release. That way existing users 
won't be broken, new users use the new names.

It is possible we could make the qpid.apache.org/... names continue to work, 
but I think it's better to make a clean break. The redirect-via-website is 
bewildering compared to the straightforward "package-name-equals-git-repo" 
convention which allows developers to easily find the source code, godocs etc.

> Support Go modules
> ------------------
>
>                 Key: PROTON-2105
>                 URL: https://issues.apache.org/jira/browse/PROTON-2105
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: go-binding
>            Reporter: Ulf Lilleengen
>            Assignee: Roddie Kieley
>            Priority: Major
>
> As of Go 1.12, go module support is available. In order to manage 
> dependencies using go modules, dependencies must also be using go modules. 
> Therefore, adding a go.mod file to each module would allow qpid proton go 
> bindings to be managed as a go module.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to