-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for compiling with Visual Studio 2019 #119
Comments
See #125 for changes needed to support vs2019 on appveyor. I have not yet merged it because vs2019 was failing some optimised tests. |
There are known bugs with coroutines in MSVC with optimizations enabled. |
See this: https://developercommunity.visualstudio.com/content/problem/498874/co-await-optimization-bugs-in-visual-studio-2019-r.html?childToView=716966#comment-716966 |
Hi - I'm a developer on the MSVC team and am working on finishing the coroutine support in VS 2019. We've recently harnessed cppcoro as part of our internal testing of the toolchain and are internally tracking bugs related to the optimized test failures, but are running all the others regularly. I also have a small number of patches to submit to address some issues due to STL header reorganization that I hope to get into a PR soon. |
@joemmett I've updated the PR to rebuild with the latest Visual Studio 2019 on AppVeyor (MSVC 14.24.28314). Compilation seems to be failing with odd front-end error messages: Is MSVC getting getting confused by the use of captures within an immediately invoked coroutine lambda? |
You can try /experimental:newLambdaProcessor |
@lewissbaker Sort of - that was a bug with resolving certain names within a lambda, it doesn't necessarily need to be immediately invoked. It's specific to using /std:c++latest, but can be worked around by either using the switch suggested by @NN--- or, even better, I tried reproducing this merge locally and adding /permissive-. I get a good build and all tests pass except two that I also saw last week:
|
Thanks @joemmett. I've updated the build config to add I'm still seeing the x86 optimised tests crash (I assume this is the issue you describe). It's possible that the async_auto_reset_event_tests could be crashing because of a race condition in the static_thread_pool implementation that I've occasionally seen (e.g. see #114). Or it could be unrelated... |
Any progress on this? |
VS 2019 16.5 fixed issues with generators and lambda. |
VS 2019 16.5 fixed issues with generators and lambda. |
I tried building the vs2019 branch with 16.5.4 and it did not build. I mainly get these two errors.
Just noticed it seems to pick up the Preview, maybe that is part of the problem? I also tried building master, but cake did not do anything there.
|
This one is fixed in master #140 Try merging from master and then build again.
This is deprecated in C++17 and removed in C++29 There is |
Ok, after merging in master it looks much better. I still get the
which I can fix, and I also get
|
After patching doctest, I at least have some libs I can link against, but one of the tests fails, which in my case is OK for the moment as I was aiming for x64.
|
Can you try with 16.6 preview ? It might be a MSVC coroutine bug. |
@joemmett Can you share more information how it is reproduced ? |
@NN--- If it's the same bug, it's an issue with the exception in the "cancel read" test in file_tests.cpp not being caught. It's specific to X86 and only in optimized builds. The catch handler for operation_cancelled is not catching the exception thrown from the coroutine and it escapes out from the test function. |
recompiling with 16.6 doesn't change anything.
|
AppVeyor has VS 2019
The text was updated successfully, but these errors were encountered: