Conversation
|
|
||
| cancellation_token<Promise> await_resume() const noexcept | ||
| { | ||
| return*this; |
There was a problem hiding this comment.
Yea, the VS auto-formatting is annoying. Thanks for pointing this out.
|
@devhawk Hey Harry, do you know why the Windows build might be failing? From the logs it appears as if it cannot find the WinMetadata folder. Any ideas? |
|
@devhawk I tried a few different things to get the remote build going, but no luck. |
|
@kennykerr I won't have time to look until monday, but based on the error log it look like the checked in copy of Windows.Foundation.winmd is corrupt. I've seen it happen where git will try and do the auto CR/LF transformation on binary files. Our .gitattributes only excludes .png and .onnx from this transformation. 2019-02-02T22:45:44.1852130Z midlrt : error MIDL1001 : [msg]cannot open input file [context]Error opening or processing WinMD c:__w\1\s\src\test\cpp\metadata\windows.foundation.winmd. HRESULT 0x80131124. |
|
@DefaultRyan I can't believe the WinMetadata folder moved. Besides, the build container image is on windows server core 1803. |
|
The git corruption thing is plausible. I'll give that a try - thanks. Still doesn't explain why it failed to find WinMetadata - the change to that folder happened in 19H1 so it won't affect the build server. |
|
Victory! Thanks Harry. |
In previous commits I have steadily reduced the size of
winrt/base.hby moving a lot of the previously hand-rolled base types (like all of the generics) into their respective namespace headers now that the winmd parser is able to handle that level of type information and we can simply generate those types. This update takes the next step by moving all of the coroutine helpers into a dedicated header.Apart from being more maintainable and supportable, it finally means that coroutine helpers like
resume_foregroundno longer have to be tacked onto the end of a specific namespace header and can instead more naturally include their dependencies. This further allowsresume_foregroundto support not only resuming on a givenWindows.UI.Core.CoreDispatcherbut it can now also support resuming on a givenWindows.System.DispatcherQueue. Previously, only one could be supported but not both since the definition could only reside in one namespace.The
resume_foregroundhelpers are now also decorated with[[nodiscard]]thus improving their usability as I had previously done for the thread pool helpers.The rest of the churn in this PR is mostly just file movement/renames to make it all a bit more consistent and approachable.
It's also become increasingly impractical to test C++/WinRT without access to the broader Windows API. We may need to take a dependency on the Windows SDK just for testing but for now I've just updated the test project to build with local metadata while we resolve that issue separately.
Here's an example of the DispatcherQueue support: