Skip to content

Convert nightly from a feature flag to a compiler flag #2754

@futursolo

Description

@futursolo

We should convert nightly from a feature flag to a compiler flag.

  1. --all-features can be used on stable. This makes testing and development easier.
    (Rust Analyzer has an option to opt-in all features, but does not have an option to enable all but 1 features.)
  2. Third-party libraries can detect whether nightly features are available with a flag like #[cfg(yew_nightly)] and opt-in nightly features at the same time with Yew itself. Libraries are not able to detect whether a feature is available for a dependency.
  3. This prevents libraries from turning on nightly features "on behalf of the user". Nightly features are by its nature "unstable", as nightly features can be rendered unusable by breaking changes in the Rust nightly version. Letting the end user setting the complier flag makes them to be aware of this issue. (See: https://internals.rust-lang.org/t/feature-request-unstable-opt-in-non-transitive-crate-features/16193#why-not-a-crate-feature-2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-yewArea: The main yew cratefeature-acceptedA feature request that has been accepted and needs implementingfeature-requestA feature request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions