yew
yew copied to clipboard
Convert nightly from a feature flag to a compiler flag
We should convert nightly from a feature flag to a compiler flag.
--all-featurescan 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.)- 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. - 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)
:+1: Good idea. That's how it should've been in the first place