You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by kenshaw <gi...@git.apache.org> on 2018/06/16 01:52:02 UTC

[GitHub] calcite-avatica-go pull request #24: Change UUID package to github.com/hashi...

GitHub user kenshaw opened a pull request:

    https://github.com/apache/calcite-avatica-go/pull/24

    Change UUID package to github.com/hashicorp/go-uuid

    The satori UUID package causes problems with go get and vgo when
    building multiple database drivers in the same Go application. This is
    because the satori package introduced breaking API changes and has not
    tagged it a new version yet.
    
    This change converts the connection ID generation to use the hashicorp
    UUID package which was already a dependency of this project, as it is a
    dependency of the gokrb package.
    
    This has the added benefit of reducing the number of total package
    dependencies by 1.
    
    Additionally, this is needed by github.com/xo/usql so that go get and
    vgo build both work "out of the box".
    
    The following is a small Go program that demonstrates that the UUIDs
    generated will be the same format:
    
    package main
    
    import (
    	"log"
    
    	guuid "github.com/google/uuid"
    	huuid "github.com/hashicorp/go-uuid"
    	suuid "github.com/satori/go.uuid"
    )
    
    func main() {
    	g, err := guuid.NewRandom()
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	h, err := huuid.GenerateUUID()
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	s, err := suuid.NewV4()
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	log.Printf(
    		"google: %s, hashicorp: %s, satori: %s",
    		g, h, s,
    	)
    }

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kenshaw/calcite-avatica-go change-uuid-dependency

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/calcite-avatica-go/pull/24.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #24
    
----
commit 8c4045dc81301036b70767d96cb27c819d6cead4
Author: Kenneth Shaw <ke...@...>
Date:   2018-06-16T01:35:01Z

    Change UUID package to github.com/hashicorp/go-uuid
    
    The satori UUID package causes problems with go get and vgo when
    building multiple database drivers in the same Go application. This is
    because the satori package introduced breaking API changes and has not
    tagged it a new version yet.
    
    This change converts the connection ID generation to use the hashicorp
    UUID package which was already a dependency of this project, as it is a
    dependency of the gokrb package.
    
    This has the added benefit of reducing the number of total package
    dependencies by 1.
    
    Additionally, this is needed by github.com/xo/usql so that go get and
    vgo build both work "out of the box".
    
    The following is a small Go program that demonstrates that the UUIDs
    generated will be the same format:
    
    package main
    
    import (
    	"log"
    
    	guuid "github.com/google/uuid"
    	huuid "github.com/hashicorp/go-uuid"
    	suuid "github.com/satori/go.uuid"
    )
    
    func main() {
    	g, err := guuid.NewRandom()
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	h, err := huuid.GenerateUUID()
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	s, err := suuid.NewV4()
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	log.Printf(
    		"google: %s, hashicorp: %s, satori: %s",
    		g, h, s,
    	)
    }

----


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by F21 <gi...@git.apache.org>.
Github user F21 commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    @kenshaw Thanks! I'll merge it when the test turns green. As the project is now part of the Apache Foundation, I will need to start a vote on the mailing list in order to tag a release. How urgent is your dependency on this fix?


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by kenshaw <gi...@git.apache.org>.
Github user kenshaw commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    I actually don't need this merged any time soon. I've already fixed the dependency issues in vgo.
    
    Also, please note that you might want to consider tagging releases as `vX.X.X` instead of `X.X.X` in the future, as only the `vX.X.X` (I believe) is going to be recognized by the `vgo` standard.


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by F21 <gi...@git.apache.org>.
Github user F21 commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    Thanks for the heads up, I'll make sure to include the `v` in the tag for the next release. As the fix is not super urgent, I'll wait for a few more commits before starting a vote for a release.


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by F21 <gi...@git.apache.org>.
Github user F21 commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    @kenshaw Thanks, this is a good idea! As this project is now part of the Apache Calcite project and the change is not trivial, can you please do the following:
    - Open an issue in JIRA and set the component to `avatica-go`: https://issues.apache.org/jira/projects/CALCITE/issues
    - Update your commit message to reflect the JIRA issue number and include your name, ex: `[CALCITE-1234] Change UUID package to github.com/hashicorp/go-uuid (Ken Shaw)`
    
    Thanks! 😄 


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by kenshaw <gi...@git.apache.org>.
Github user kenshaw commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    Updated, see: https://issues.apache.org/jira/browse/CALCITE-2367


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by kenshaw <gi...@git.apache.org>.
Github user kenshaw commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    @F21 done.


---

[GitHub] calcite-avatica-go pull request #24: Change UUID package to github.com/hashi...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/calcite-avatica-go/pull/24


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by F21 <gi...@git.apache.org>.
Github user F21 commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    @kenshaw Can you use `(` instead of `[`? Sorry for being picky, but these are the standards being set by Apache Calcite.


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by kenshaw <gi...@git.apache.org>.
Github user kenshaw commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    @F21 updated.


---

[GitHub] calcite-avatica-go issue #24: Change UUID package to github.com/hashicorp/go...

Posted by F21 <gi...@git.apache.org>.
Github user F21 commented on the issue:

    https://github.com/apache/calcite-avatica-go/pull/24
  
    @kenshaw, thanks that looks great! As you're not a committer of Apache Calcite, can you please include your name in parenthesis at the end of the commit message?


---