-
Notifications
You must be signed in to change notification settings - Fork 111
Require that errors are Send/Sync/'static. #241
base: master
Are you sure you want to change the base?
Require that errors are Send/Sync/'static. #241
Conversation
Currently, they are not Sync because they contain a non-Sync trait object. This is a breaking change. The decision to make errors Send but not Sync was made in rust-lang-deprecated#110. We believe that decision was a mistake, because it perpetuates a !Sync restriction on all users even if their errors are, in fact, Sync. Instead, users who need errors that are !Sync should use synchronization when transforming their errors into error-chain errors.
I support this PR. Here are some arguments I have for supporting it.
|
cc @rust-lang-nursery/libs I'd like to merge this PR, any objections? |
I'm in favour of this too 👍 |
I have no ticky box to check off :( Sounds great! |
If everyone is in favor, can this be merged? We'll still have to get crates that use |
@withoutboats, can you merge and publish? |
Will do this week! |
@withoutboats I guess you got a bit delayed? 😄 |
I'd really love to see this merged. |
Ooo |
Ping @withoutboats :) |
Did you fall into a black hole? I need this. :( |
I don't believe we have the support required to add features to this library. We are currently only maintaining compatibility with rustc and not adding features. |
Does that mean |
I'm most concerned with the breaking change adversely affecting users of the library. I guess I may be taking too measured an approach. |
Ah, good point. Though the consensus was that this is wanted, so it may be worth it? It'd definitely need to be semver-breaking, so that people update at their own pace. |
I don't think I'm alone in my assessment that |
|
Right, the change would have to be breaking anyway, so might as well change the library. |
Made a new pull request that adds 'Sync' via a feature toggle for backwards compatibility |
Currently, they are not Sync because they contain a non-Sync trait
object. This is a breaking change.
The decision to make errors Send but not Sync was made in #110. We
believe that decision was a mistake, because it perpetuates a !Sync
restriction on all users even if their errors are, in fact, Sync.
Instead, users who need errors that are !Sync should use
synchronization when transforming their errors into error-chain
errors.
cc @aturon