-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gazelle vendor support #114
Comments
(chiming in) There would have to be a |
So running gazelle creates deps by using a consistent conversion string However in both cases that assumes you have all of the right things in your Presumably what we need is either a stand-alone "workzelle", or something I have started working on such a thing, but want to touch base with @yugui On Wed, Sep 21, 2016 at 11:08 PM, Paul Cody Johnston <
|
Both of Also, I just want to share another point in my mind with you -- it might be related to this topic. Some users (e.g. my team) �uses both of |
Thanks for the work on gazelle and all the great feedback! As best I can tell, none of these proposals match the semantics of the go tool. My initial bug report was not clear about what I am looking for. The problem is that multiple repositories can all depend on different versions of Instead of the proposed behavior, it seems better to me that the vendored copy of However, at that point, why can't the dependencies in Does this behavior seem reasonable? |
On Fri, Sep 23, 2016 at 2:27 AM, Andy Hochhaus notifications@github.com
For the remote-vendored diamond dependency problem, bazel wants you to
|
Thanks.
Yes, for example rsc/letsencrypt/vendor/github.com/xenolf/lego.
Unfortunately, you can't always "pick a single winner" as the API could have changed between library versions. Since GOVENDOREXPERIMENT became the default in Go 1.6 the standard go build tools assume that multiple different versions of the same library can be compiled into a single binary. I think that if In the case of
I certainly see value in both models. For example, a downside of using the At a minimum could we make this behavior configurable via an option? |
I agree, the whole point of vendoring is that you can maintain several different versions of the same library in the same WORKSPACE, so it does not seem right to hoist a vendored name into the global at-namespace. I'm not in love with the |
Good point. I'm happy with any name. I was just trying to propose the concept with a concrete example. |
I re-read this and realized that what is really needed for consistency with the Go tool, is gazelle generating dependencies to things that are vendored, rather than to external repos. Probably:
|
To workaround no support for vendor/ in gazelle, the kubernetes project is using https://github.com/mikedanese/gazel |
What is your gazel? always use vendored? or are there other features?
…On Tue, Dec 20, 2016 at 7:47 PM, Mike Danese ***@***.***> wrote:
To workaround no support for vendor/ in gazelle, the kubernetes project is
using https://github.com/mikedanese/gazel
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#114 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALF-0t_teWNW2uCV7RYLGhRW-zzRar6aks5rKHcYgaJpZM4KDdMI>
.
|
It manages most of the BUILD files in kubernetes. It produces a single very big BUILD file for vendor https://github.com/kubernetes/kubernetes/blob/master/vendor/BUILD. We don't use go_library remote repository rules yet and may never. As far as I could tell, gazelle requires this for libraries outside of your go_prefix. It also allows for partially managed BUILD files. With gazelle it's all or none. There may be other differences as well. |
@mikedanese, can you add a README to your repository that shows how to use it? |
@pcj added a README |
@mikedanese Nit: will render better as |
#227 contains a partial fix, I think. |
I think what's missing after #227 is the ability to generate BUILD files in |
Preferably a single BUILD file in the root of vendor/ |
This would be pattern 2 in #16 (comment), right? As far as i understand it, gazelle only implements patterns 1 and 3 so far, while the gazel tool used in Kubernetes implements pattern 2. It would be nice if gazelle also supported that pattern. |
Close old Gazelle issues. If Gazelle isn't doing something you want, please open a new issue at https://github.com/bazelbuild/bazel-gazelle. This should be working now. Gazelle will resolve dependencies against existing libraries in vendor in either external or vendored mode. |
Is vendoring automatically supported when using gazelle/
new_go_repository()
?As a specific example, when using
new_go_repository()
with a repository that uses vendoring (eg: https://github.com/rsc/letsencrypt) I see that gazelle creates BUILD files for the vendored repositories.For example, adding the following to my WORKSPACE:
generates the following BUILD files:
However when I build, the vendored repository (
com_github_xenolf_lego
) can't be found.The text was updated successfully, but these errors were encountered: