-
Notifications
You must be signed in to change notification settings - Fork 633
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
gazel not putting dependencies into WORKSPACE #295
Comments
(I'm pretty sure this is something odd about my repo, but I also just don't see any way to diagnose it.) |
Actually you are doing nothing wrong. There is a tool that mostly works called wtool, In this case after gazelle, you would build and see this issue, then run: And try again, note this may require mutliple iterations, or you can build '-k' and add multiple repos at a time, but it is still a slightly annoying process. |
Having Gazelle update the WORKSPACE with missing dependencies would be pretty useful though. I can work on that soon. |
That gets tricky. How do you know which dependencies are missing? load("@io_bazel_rules_go//proto/go_proto_repositories.bzl", "go_proto_repositories") You would have to transitively load go_proto_repositories() from a remote repo to discover that it provides @com_github_golang_protobuf, and therefore only @io_k8s_kubernetes should be added to the WORKSPACE. It is for this reason that I haven't added this functionality to gazelle, and wrote the quick & dirty wtool, which does not do transitive loading, but rather requires you to decide to run |
Good point, Skylark evaluation makes this a lot harder. |
Oh thanks for the fast response & the course-correction! The README says:
Not sure if I am parsing that first sentence wrong? |
(Trying wtool now though, but any issues there would be a separate issue I'd guess!) |
You are parsing that sentence correctly; that's my mistake. I had some misunderstanding about that earlier. Will correct today. |
No worries, and thank you so much @jayconrod . I'll leave this open for you to track, but feel free to close at will. wtool is much better than the alternative which is how I was doing it before, so thank you for that tool. For me the biggest painpoint was having to match the git versions to the Godeps, but I think we should probably wait for the |
Migrating old Gazelle issues to the new repository. This one is bazelbuild/bazel-gazelle#56. |
I followed the instructions in the README, but gazelle does not add any of my dependencies to the
WORKSPACE
file. I don't know how to diagnose this - I can't see any options for verbose logging etc.WORKSPACE is unchanged - no dependencies:
The text was updated successfully, but these errors were encountered: