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

Tools should not be in the default metadata gathering #89

Open
aiuto opened this issue Apr 24, 2023 · 1 comment
Open

Tools should not be in the default metadata gathering #89

aiuto opened this issue Apr 24, 2023 · 1 comment
Labels
bug Something isn't working P2

Comments

@aiuto
Copy link
Collaborator

aiuto commented Apr 24, 2023

When you depend on a tool it should not be included in the license/metadata gathering.
We have the filtering function, but it is insufficient.

Some ideas:

  • filter any dependency in the exec configuration. Crude but mostly right.
  • metadata about the attribute usage on attributes. Elegant but hard.
@aiuto aiuto added the bug Something isn't working label Apr 24, 2023
aiuto added a commit to aiuto/rules_license that referenced this issue Apr 24, 2023
While transitively gathering metadata:
- look at the bin.dir for any target we are traversing
- if it contains -exec it is probably in the exec configuration
  so skip it.
aiuto added a commit that referenced this issue Apr 27, 2023
@junglegoog
Copy link
Contributor

junglegoog commented Jul 6, 2023

Because most tools are executables, attributes referencing such tools can be filtered in the gathering aspects via:

if attr_name in dir(ctx.rule.executable):
  // skip attr

@aiuto aiuto added the P2 label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
Development

No branches or pull requests

2 participants