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

Delete rules which are empty except for deps #22

Closed
jayconrod opened this issue Dec 11, 2017 · 0 comments
Closed

Delete rules which are empty except for deps #22

jayconrod opened this issue Dec 11, 2017 · 0 comments
Labels

Comments

@jayconrod
Copy link
Contributor

Gazelle merges rules in two separate phases: an early phase for all attributes except deps, and a late phase for deps only.

The merger deletes rules which are named in the empty list if, after merging, they have no attributes other than name and visibility.

Deletion is only performed in the first merge phase.

This means that rules that are empty except for deps will not be deleted.

@jayconrod jayconrod added the bug label Dec 11, 2017
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Dec 12, 2017
Rules are deleted after they are merged with empty rules produced by
the generator when they have no attributes other than "name" and
"visibility".

An earlier change split merging into two phases: everything except
"deps", and then "deps".

With this change, both merge phases have a chance to delete
rules. This means that rules that had deps but are now empty will be
deleted.

Fixes bazelbuild/bazel-gazelle#22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant