Skip to content
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

Index build files in external repositories #12

Open
jayconrod opened this issue Dec 7, 2017 · 1 comment
Open

Index build files in external repositories #12

jayconrod opened this issue Dec 7, 2017 · 1 comment

Comments

@jayconrod
Copy link
Contributor

(Migrated from bazel-contrib/rules_go#606)

Gazelle currently builds an index of libraries in the current repository and uses it to resolve dependencies. We should expand this to cover libraries in external repositories.

Bazel holds a directory for each external repository that has been fetched within its cache directory. We should index these directories, rather than checking out repositories separately, since extra checkouts are expensive, and we need to avoid reproducing Bazel logic to generate or replace build files (i.e., go_repository or something similar). We won't attempt to index repositories that haven't been fetched by Bazel.

jayconrod pushed a commit to jayconrod/bazel-gazelle that referenced this issue Jul 2, 2018
* proto.csv is a table that lists Well Known .proto files and all
  .proto files in @go_googleapis. For each proto import string, it
  lists the proto_library label, the Go import path, and the
  go_proto_library label. This was generated using an ad hoc Python
  script (not included).
* Maps are generated from this file and incorporated into the
  dependency resolution logic in the proto and go extensions.

When bazel-contrib#12 is implemented, we can index rules in external repositories,
and we won't need this. We need it for now because there's no clear
correspondence between proto and Go import strings and the libraries
that should be included.

Related bazel-contrib/rules_go#1548
jayconrod pushed a commit to jayconrod/bazel-gazelle that referenced this issue Jul 3, 2018
* proto.csv is a table that lists Well Known .proto files and all
  .proto files in @go_googleapis. For each proto import string, it
  lists the proto_library label, the Go import path, and the
  go_proto_library label. This was generated using an ad hoc Python
  script (not included).
* Maps are generated from this file and incorporated into the
  dependency resolution logic in the proto and go extensions.

When bazel-contrib#12 is implemented, we can index rules in external repositories,
and we won't need this. We need it for now because there's no clear
correspondence between proto and Go import strings and the libraries
that should be included.

Related bazel-contrib/rules_go#1548
jayconrod added a commit that referenced this issue Jul 3, 2018
…251)

* proto.csv is a table that lists Well Known .proto files and all
  .proto files in @go_googleapis. For each proto import string, it
  lists the proto_library label, the Go import path, and the
  go_proto_library label. This was generated using an ad hoc Python
  script (not included).
* Maps are generated from this file and incorporated into the
  dependency resolution logic in the proto and go extensions.

When #12 is implemented, we can index rules in external repositories,
and we won't need this. We need it for now because there's no clear
correspondence between proto and Go import strings and the libraries
that should be included.

Related bazel-contrib/rules_go#1548
@blico
Copy link
Contributor

blico commented Jun 3, 2019

This and #529 would be a great improvement for us. Are you open to PRs here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants