Skip to content
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

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

Closed
futursolo opened this issue Jun 26, 2022 · 1 comment · Fixed by #2827
Closed

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

futursolo opened this issue Jun 26, 2022 · 1 comment · Fixed by #2827
Labels
A-yew Area: The main yew crate feature-accepted A feature request that has been accepted and needs implementing feature-request A feature request
Milestone

Comments

@futursolo
Copy link
Member

futursolo commented Jun 26, 2022

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)
@hamza1311 hamza1311 added feature-request A feature request A-yew Area: The main yew crate feature-accepted A feature request that has been accepted and needs implementing labels Jun 26, 2022
@hamza1311 hamza1311 added this to the v0.20 milestone Jun 26, 2022
@hamza1311
Copy link
Member

👍 Good idea. That's how it should've been in the first place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate feature-accepted A feature request that has been accepted and needs implementing feature-request A feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants