Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Avoid having to await ReturnsAsync #53

Open
kzu opened this issue Jan 5, 2021 · 4 comments
Open

Avoid having to await ReturnsAsync #53

kzu opened this issue Jan 5, 2021 · 4 comments

Comments

@kzu
Copy link
Member

kzu commented Jan 5, 2021

Currently this generates a warning from the compiler since you're not awaiting a Task-returning method

@kzu kzu added the enhancement label Jan 5, 2021
@stakx
Copy link
Contributor

stakx commented Jan 5, 2021

I'm not certain I understand this issue correctly, but if I do, devlooped/moq#1126 may be relevant here. That kind of compiler warning is one of the reasons why I added the ability to directly set up a task's .Result to Moq 4.

@kzu
Copy link
Member Author

kzu commented Jan 6, 2021

Such a beautiful and simple solution! Thanks for bringing it up. Makes perfect sense. Now I want to remove all Async overloads in Moq 5, 😅.

Thanks a ton for keeping an eye on this repo and plz do monitor https://github.com/devlooped/avatar too 🙏

@stakx
Copy link
Contributor

stakx commented Jan 6, 2021

@kzu, glad you like it. 😃 And yes, I'll keep an eye on both Moq 5, and Avatar. Such impressive libraries!

@stakx
Copy link
Contributor

stakx commented Jan 6, 2021

Now I want to remove all Async overloads in Moq 5

@kzu, please ping me if you decide to do that. I've considered marking them as [Obsolete] in Moq 4, but due to them likely being in widespread use, I've so far resisted. However, if Moq 5 won't have them anymore, I'd go ahead an deprecate them in 4, too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants