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

FixLoad loads helper functions, not just rules #1164

Merged

Conversation

illicitonion
Copy link
Contributor

What type of PR is this?

Feature

What package or component does this PR mostly affect?

merger

What does this PR do? Why is it needed?

Some language implementations may try to add helper functions as
CallExprs, e.g. in rules_python the requirement function, or in
rules_jvm_external the artifact function. This allows for parsing
these out and adding load statements for them.

Which issues(s) does this PR fix?

See also: #981, #978, #1087 (but does not fully fix them).

Other notes for review

This approach was suggested in this comment.

@blico
Copy link
Member

blico commented Jan 25, 2022

@illicitonion thanks for the great PR! Left one comment, but besides that the change LGTM.

merger/fix.go Show resolved Hide resolved
Some language implementations may try to add helper functions as
`CallExpr`s, e.g. in rules_python the `requirement` function, or in
rules_jvm_external the `artifact` function. This allows for parsing
these out and adding `load` statements for them.

See also: bazelbuild#981, bazelbuild#978, bazelbuild#1087
@blico blico merged commit 358152f into bazelbuild:master Jan 25, 2022
@illicitonion illicitonion deleted the add-loads-for-helper-functions branch January 25, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants