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: add missing dependencies to WORKSPACE #389
Comments
Pretty please?? Sugar on top. Automating this would be HUGE |
This is definitely still planned, but a lot of work is needed. The rough design right now is to add four commands:
|
Just starting simple where it adds a new block for the user with the expected name would be super. Just have the user out in the git URL and the sha. If we can get someone in that helps with typing and then make it smart later. Also I think bazel has feature flags? Fairly new to this project. |
There's actually a tool that does this, but I intend to delete it as soon as Gazelle is capable of replacing this. You can find it in go/tools/wtool (
This would add this block to WORKSPACE (it figures out the sha1 automatically):
|
Do you mean support for build tags ( |
Found this issue and #295 while trying to find any links between bazel and dep. To me it seems dep and bazel/gazelle might complement each other in a beneficial way (I actually have done this productively already by half-automatically creating parts of the Is there any endeavour to use the files generated by dep to generate the |
@Xjs There is some work planned for this. Gazelle will have a command (something like We're planning to deprecate |
See bazelbuild/bazel-gazelle#47 for the new update-repos command |
Gazelle should provide a mechanism to add
new_go_repository rules
to the WORKSPACE file in order to resolve import paths for missing external dependencies. This should be behind a flag (say,-update_workspace
). When an external dependency is added, its dependencies should be added recursively.When a new dependency is added, Gazelle should try to use a known version of that dependency, if possible. For example, suppose we want to add a dependency on "foo" because our dependency "bar" has "foo" in its vendor directory, which is managed with Godep. We should read Godeps.json to determine the preferred version of "foo".
When a dependency that was automatically added by Gazelle is no longer needed, we should remove it from WORKSPACE (again, behind a flag). We should avoid removing any rules manually added by the developer. If this can't be done safely, we should at least emit a warning.
The text was updated successfully, but these errors were encountered: