-
Notifications
You must be signed in to change notification settings - Fork 26
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
(breaking change) Add std and alloc features #65
Conversation
These features do nothing and raise a compiler error if disabled. However this enables us to disable these features in the future. Signed-off-by: John Nunley <[email protected]>
Firstly, why is this a breaking change? 🤔
While I understand the motivation here, having There is no hurry on smol-rs/smol#31 so if you are confident that you can add the implementation soonish, we can hold off on 1.0 for now. |
If a crate has this in its [dependencies]
async-broadcast = { version = "0.7", default-features = false } They will need to change it to: [dependencies]
async-broadcast = { version = "0.7", default-features = false, features = ["std"] }
I don't think this is an issue in practice:
As a counterpoint, we need to prepare for the possibility that it will. This is largely about stability. If we release v1.0 now and then add a |
Oh I missed the compiler error you inserted. Given we don't have any features currently, I think this is only breaking in theory.
I disagree with the argument (once you realise that the feature is dummy, there is no reason to file an issue) but I think the compiler error you added, will prevent people from making a mistake. It's just very annoying to find out that way though.
Sure but since we don't have any features (let alone default ones), I don't think this will be a breaking change in practice. |
No, this is breaking in practice. If anyone does import |
Yes but they won't and shouldn't because there are no features to disable. If people do this for no reason, of course their builds will break later. Should we really confuse others with a dummy feature for people who do that? I don't think so. |
But if you strongly disagree and want to cater for people who disable default features out of habit or by mistake, I think it's easier to just wait till we have nostd implemented or we can decide not to go nostd in the near future. Those are the only choices IMO. Btw I learnt about |
Based on my previous comment, I'm closing this. |
It doesn't matter. Theoretically there could be a user of This strategy is used by other crates in |
"theoretically", yes. That's my whole point here. Even if there actually are any users who do that (for some unknown reason), I don't think we need to cater for them.
Maybe they shouldn't. :) |
These features do nothing and raise a compiler error if disabled. However this enables us to disable these features in the future.