> You mean to "go get -u" the repository and then merge that into vendor/?
>
> I not that familiar with workflows used by those who vendor code, having
> used this approach only a wee bit.
>
> But I would say that one advantage of the two step process is that any other
> tools that augment the "go get -u" process could be used alongside the tool
> to vendor packages.
I haven't given this a lot of thought, but I think I was wondering
what would happen if say the application imported both
github.com/lib/pq
and some vendorized version
github.com/you/pkg/vendor/github.com/lib/pq
I'm also concerned about what happens if the package you depend on has
also gone down the vendor route
github.com/your/pkg/vendor/github.com/someoneelse/pkg/github.com/lib/pq
would be surprising to discover in your dependency tree. It strikes me
that vendoring is only appropriate for projects that just consume
packages, not provide them.
> Do you mean all the code in the app, including all transitive dependencies
> in vendor/?
I probably didn't explain this point thoroughly enough, but yes, if
vendoring is the process whereby you package (in the Debian sense of
the word) everything that your application needs inside it so it is
just one repo, on tarball that just needs a Go compiler, then yes.
> If there is something in $GOPATH not used by the app, I see no reason to
> include it in the tarball.
Yup, not sure how I hinted at that, it's not an issue. I'm only
considering the big blob of code that lives in
github.com/you/pkg/vendor
> I think that for any commit made to the app, all dependencies should be in
> vendor/, and the tool should help to check that.
Sounds sane.
> Rewriting import paths the other way would just be to access DVCS tools and
> contribute upstream, but only for temporarily use during development.
>
>>
>> I raise point 2 not to shoot down your idea, just to mention that for
>> that subset of the Go community they will probably take issue.
Yup, I wasn't clear before. I had on by Debian packaging hat without
giving anyone the requisite 10 minute warning.
> I'm not sure if this is what you're getting at.... having an app not contain
> code for all its dependencies?
>
> There are more than a dozen tools that use the "revision locking" approach
> for "reproducible builds", despite the caveats:
>
> 1. No safety against repositories vanishing, resulting in a bad day for the
> developer, impacting downstream users of the app who build from source, and
> breaking the ability to build old versions of the app without first fixing
> import paths.
Debian based distros (and Redhat for that matter) consider this a
solved problem, source debs or srpms contain everything they need to
be rebuilt.
> 2. Requiring a separate solution for project-specific workspaces, which may
> also impact downstream users.
>
> Even knowing the tradeoffs, some may prefer this approach. I think that's
> fine. I think our working group should help people be aware of the trade
> offs for the tools they choose, and help cut through the confusion of 20
> tools that do the same thing slightly differently.
The specific problem for distro makers can be summarised as this. If
your application is compiled against it's own private copy of zlib or
openssl, it is harder to update when those packages have security
issues, and harder to _know_ those packages even need to be updated
because the package metadata does not declare a dependency on the
vulnerable package.
Substitiute zlib and openssl for the Go code vendored into the tarball
that represents the input to the dpkg-buildpkg step and you can
understand why they get grumpy about private (vendor) copies of
libraries.
>
> If we can reduce the tradeoffs, then even better, such as improving upstream
> collaboration for tools used to vendor Go packages.
>
> The README for Goven suggests that it doesn't support Windows. Ensuring that
> it does work before Go 1.2 is released should take minimal effort, and
> hopefully we can do a whole lot more in the next 8 weeks.
>
> Cheers,
> Nathan.
>
> P.S. I didn't make a separate thread for "revision locking" when the group
> began. Probably should.
>