On Sun, Feb 5, 2017 at 11:39 PM, Jeff Kayser
<jeff.kay...@jibeconsulting.com> wrote:
> Hi, Manlio.
>
> Thank you for your reply!
>
> The project is an application, however, I’m planning to write the underlying 
> components so they are reusable, so they can be leveraged elsewhere.  Since I 
> will be using the packages to build an app, I need to make sure the builds 
> are reproducible.  ☺
>

In this case move them to a separate package/project.
As an example, create a git repository in
$GOPATH/src/github.com/$USER/project/

Use this git repository for the main development,
and tag your versions with tags and branches.

Then in your application, clone the repository in
vendor/src/github.com/$USER

In this case you have full control over the version used, and you can
also modify the code and pull/push changes to the original repository.
For your first project, probably all the development will be in the
cloned repository, and you will push the changes to the original
repository once the code is stable and needs to be used by other
projects.

Another solution is to put the reusable components in an internal
package (of your application), and once you like the code you move it
to a new project.
I like this one, because it will allow you to start with a draft.

> I had a very helpful email exchange with Dave Cheney, and he suggested gb + 
> semver.  With the current lack of convergence on go package 
> versioning/dependency management, it seems wise to me to follow his 
> recommendation, since he is one of the Go gurus.
>
> Hey, go+ is a cool script!  Thanks for sharing!
>
> I’m finding out (the hard way) how to deal with cyclic dependencies, so 
> package management has become really important to me.
>

Go does not support cyclic dependencies, and I don't see how package
management is related to cyclic dependencies.

> Question: is it possible for gb to vendor a specific version of a package?

Yes.
It is specified in the documentation
    gb vendor help fetch

You can specify a tag, branch or exact revision.

> [...]

Manlio

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to