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

Directive to reference macros from WORKSPACE #483

Closed
jayconrod opened this issue Mar 15, 2019 · 2 comments
Closed

Directive to reference macros from WORKSPACE #483

jayconrod opened this issue Mar 15, 2019 · 2 comments

Comments

@jayconrod
Copy link
Contributor

#480 will add the ability for update-repos to write repository rules to a macro in a separate .bzl file.

Gazelle currently reads repository rules declared in WORKSPACE in order to discover custom repository names and known prefixes. This information is used for dependency resolution. If repositories are declared in a macro, this information will no longer be available (though #132 would be a useful escape hatch).

We should have a directive that tells Gazelle to look for repository rules in a macro in a .bzl file. It should be possible to repeat this directive, since there may be multiple macros.

# gazelle:repository_macro repos.bzl%go_repositories

This is mainly useful for the fix and update commands, but bonus points if update-repos can update repository rules in the corresponding macros without additional command line arguments instead of writing copies to WORKSPACE.

@ifoox
Copy link

ifoox commented Jun 10, 2019

Hi Jay, do you intend to make a release of Gazelle with this included any time soon? (I see the last release is from Feb).

@jayconrod
Copy link
Contributor Author

Soon, yes. #477 is the main release blocker. I've gotten sidetracked with some toolchain compatibility issues in new versions of Bazel, but I expect to come back to this soon.

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