cynic icon indicating copy to clipboard operation
cynic copied to clipboard

Consider returning TokenStreams instead of Results

Open obmarg opened this issue 4 years ago • 1 comments

There's a lot of places where we return Results in cynic and then convert to TokenStream a level up. This is fine, but may limit our ability to error to a single error at a time. Might be more appropriate to convert to TokenStreams at every different point that can error so we can have > 1 error emitted from each macro invocation.

obmarg avatar May 23 '20 12:05 obmarg

#132 adds the cynic::Errors type that wraps up several syn::Errors into one, and supports emitting all of them. That seems a better solution than the one proposed in this issue, so should probably just update any code that emits > 1 error to use this type.

obmarg avatar Oct 31 '20 18:10 obmarg

I've at least partially done this now. Not fully, but enough that the issue can be closed. Any further work should probably be handled by the move to proc-macro-error in #695

obmarg avatar Aug 05 '23 18:08 obmarg