Skip to content

Add a Builder::blacklist_type method; deprecate Builder::hide_type #984

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

Closed
6 tasks
fitzgen opened this issue Sep 13, 2017 · 5 comments
Closed
6 tasks

Add a Builder::blacklist_type method; deprecate Builder::hide_type #984

fitzgen opened this issue Sep 13, 2017 · 5 comments

Comments

@fitzgen
Copy link
Member

fitzgen commented Sep 13, 2017

Currrently, the --blacklist-type flag's corresponding Builder method is Builder::hide_type.

The naming difference is unnecessary, inconsistent, makes it harder for users to switch from CLI to builder or vice versa, and adds one more thing to remember/know about the code base when developers are reading about hidden or blacklisted things.

We should:

  • Add Builder::blacklist_type, that does the same thing as hide_type
  • Mark Builder::hide_type as #[deprecated = "Use blacklist_type instead"]
  • Make hide_type delegate to blacklist_type
  • Rename the BindgenOptions::hidden_types member to BindgenOptions::blacklisted_types
  • Rename ir::context::BindgenContext::hidden_by_name to blacklisted_by_name
  • Rename ir::item::Item::is_hidden to is_blacklisted
@highfive
Copy link

Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the #servo channel in IRC.

If you intend to work on this issue, then add @highfive: assign me to your comment, and I'll assign this to you. 😄

@alexeyzab
Copy link
Contributor

Hi! I'd like to try implementing this.

@highfive: assign me

@highfive
Copy link

Hey @alexeyzab! Thanks for your interest in working on this issue. It's now assigned to you!

alexeyzab added a commit to alexeyzab/rust-bindgen that referenced this issue Sep 14, 2017
This deprecates `Builder::hide_type`.
Related to rust-lang#984.

- [x] Add Builder::blacklist_type, that does the same thing as hide_type
- [x] Mark Builder::hide_type as #[deprecated = "Use blacklist_type instead"]
- [x] Make hide_type delegate to blacklist_type
- [x] Rename the BindgenOptions::hidden_types member to BindgenOptions::blacklisted_types
- [x] Rename ir::context::BindgenContext::hidden_by_name to blacklisted_by_name
- [x] Rename ir::item::Item::is_hidden to is_blacklisted
bors-servo pushed a commit that referenced this issue Sep 14, 2017
Add a `Builder::blacklist_type`

This deprecates `Builder::hide_type`.
Related to #984.

- [x] Add Builder::blacklist_type, that does the same thing as hide_type
- [x] Mark Builder::hide_type as #[deprecated = "Use blacklist_type instead"]
- [x] Make hide_type delegate to blacklist_type
- [x] Rename the BindgenOptions::hidden_types member to BindgenOptions::blacklisted_types
- [x] Rename ir::context::BindgenContext::hidden_by_name to blacklisted_by_name
- [x] Rename ir::item::Item::is_hidden to is_blacklisted

r? @fitzgen
@tamird
Copy link
Contributor

tamird commented Sep 16, 2017

fixed in #991

@fitzgen
Copy link
Member Author

fitzgen commented Sep 18, 2017

Thanks for the reminder, @tamird !

@alexeyzab, fwiw, if you add "Fixes #12345" in the git commit message, github will automatically close the issue once the relevant PR is merged.

@fitzgen fitzgen closed this as completed Sep 18, 2017
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

4 participants