Skip to content

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

@fitzgen

Description

@fitzgen

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions