-
Notifications
You must be signed in to change notification settings - Fork 897
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
Build on stable Rust #58
Comments
Ping @Diggsey, @brson. Thoughts on this? I'm happy to replace the notification infrastructure with something more like the emitter setup in rustc. That would get the facility without the ability to call the notifiers as though they were functions. My personal feeling is that the internal ergonomics win isn't worth requiring nightly. |
Yes please! We should try to get on stable IMO.
|
This removes the usage of #[fundamental] and intrinsics::type_name in the notifications module. The `Notifyable` trait and `Notifier` struct were also removed in favor of just using `&Fn(Notification)` where necessary. This change is less ergonomic when crossing crate boundaries where `Notifier` naturally implemented `Notifyable` for multiple notification types before. Instead, now closures must be written as: &|n| prev_handler(n.into()) Which is to say that when crossing crate boundaries you need to remap notification closures and leverage a `From` implementation. This crate does not currently compile on the stable *channel* due to the usage of `panic::catch_unwind` in the curl crate for now, but that will get fixed with the next stable release, this is just paving the way forward! Closes rust-lang#58
This removes the usage of #[fundamental] and intrinsics::type_name in the notifications module. The `Notifyable` trait and `Notifier` struct were also removed in favor of just using `&Fn(Notification)` where necessary. This change is less ergonomic when crossing crate boundaries where `Notifier` naturally implemented `Notifyable` for multiple notification types before. Instead, now closures must be written as: &|n| prev_handler(n.into()) Which is to say that when crossing crate boundaries you need to remap notification closures and leverage a `From` implementation. This crate does not currently compile on the stable *channel* due to the usage of `panic::catch_unwind` in the curl crate for now, but that will get fixed with the next stable release, this is just paving the way forward! Closes rust-lang#58
This removes the usage of #[fundamental] and intrinsics::type_name in the notifications module. The `Notifyable` trait and `Notifier` struct were also removed in favor of just using `&Fn(Notification)` where necessary. This change is less ergonomic when crossing crate boundaries where `Notifier` naturally implemented `Notifyable` for multiple notification types before. Instead, now closures must be written as: &|n| prev_handler(n.into()) Which is to say that when crossing crate boundaries you need to remap notification closures and leverage a `From` implementation. This crate does not currently compile on the stable *channel* due to the usage of `panic::catch_unwind` in the curl crate for now, but that will get fixed with the next stable release, this is just paving the way forward! Closes rust-lang#58
The main blocker for this is the use of
#[fundamental]
in the notification system. I haven't looked into it in too much detail, but I think this can be done by reducing the amount of typegineering going on. Thoughts?The text was updated successfully, but these errors were encountered: