Skip to content

Consistent design for unstable APIs (including provider modules) #6659

@Manishearth

Description

@Manishearth

See also: #4193, #6630, #6629

@robertbastian came up with this plan earlier. The idea is that every ICU4X crate has an unstable feature, for exposing unstable/experimental APIs.

Provider modules (and try_new_unstable) of course must always be publicly available, but we mark them as cfg(not(feature = "unstable"), doc(hidden)).

This means:

  • docs.rs still shows them (we run that with all-features). There will be stability banners (Use nightly feature documentation #6630)
  • Local docs builds will not show them for most people
  • cargo-semver-checks will ignore these APIs.

Crates may still choose to have doc(hidden) things that are not exposed with the feature: the line is whether we expect users to use this API at all. For example, the properties open enum newtype field should remain unconditionally doc(hidden); we do not wish for ICU4X users to see that field. We continue to be conservative about using doc(hidden).

cc @sffc @robertbastian

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-metaComponent: Relating to ICU4X as a wholediscussDiscuss at a future ICU4X-SC meeting

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions