Rewrite InitializeReader and Analyze as truly synchronous methods - #290
Conversation
This prevents the [sync over async][1] anti-pattern for the `InitializeReader` and `Analyze` methods. Note that this source generator could be used on many more async methods in order to greatly reduce sync/async code duplication across the projects. [1]: https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#warning-sync-over-async
|
I think I'm more inclined to manually maintain a sync version of each method than take an external dependency on this source-gen package. I need to remind myself the scope of work that would be required to achieve that. I know sync over async can be problematic, but I thought it was mostly an issue in "hot path" code, and |
|
Apparently not much work. Thanks. I'll merge. |
|
Thanks for merging this, too! Are you planning to release a new version of the Sylvan.Data.Csv package? |
|
Yes. I've been away on vacation the last few days. I'll get to it soon. |
|
New versions of Sylvan.Data and Sylvan.Data.Csv have been published with these changes. Thanks again for your contributions. |
This prevents the sync over async anti-pattern for the
InitializeReaderandAnalyzemethods.Note that this source generator could be used on many more async methods in order to greatly reduce sync/async code duplication across the projects.