Comments (6)
I feel this is a compiler bug. There are several bugs in clang15 related to coroutines. It may be fine to use Lazy. But generator is more complex.
I'll close this issue and update the document later.
from async_simple.
@ChuanqiXu9
umm... I forgot to mention: this issue will result in one of the consequences being that with the latest macos default apple-clang (currently version 15), ctest fails to pass a unit test --async_simple_coro_test
.
3: Test command: /Users/yxb/workspace/async_simple/build/async_simple/coro/test/async_simple_coro_test
3: Working Directory: /Users/yxb/workspace/async_simple/build/async_simple/coro/test
3: Test timeout computed to be: 10000000
3: Note: Google Test filter = GeneratorTest.testExample
3: [==========] Running 1 test from 1 test suite.
3: [----------] Global test environment set-up.
3: [----------] 1 test from GeneratorTest
3: [ RUN ] GeneratorTest.testExample
3: start
3: foo!
3: bar!
3: bar!
3: unknown file: Failure
3: C++ exception with description "Can't increment generator end iterator" thrown in the test body.
3:
3: [ FAILED ] GeneratorTest.testExample (0 ms)
3: [----------] 1 test from GeneratorTest (0 ms total)
3:
3: [----------] Global test environment tear-down
3: [==========] 1 test from 1 test suite ran. (0 ms total)
3: [ PASSED ] 0 tests.
3: [ FAILED ] 1 test, listed below:
3: [ FAILED ] GeneratorTest.testExample
3:
3: 1 FAILED TEST
3/5 Test #3: run_async_simple_coro_test .......***Failed 0.00 sec
test 4
Start 4: run_async_simple_executor_test
from async_simple.
@ChuanqiXu9 umm... I forgot to mention: this issue will result in one of the consequences being that with the latest macos default apple-clang (currently version 15), ctest fails to pass a unit test --
async_simple_coro_test
.3: Test command: /Users/yxb/workspace/async_simple/build/async_simple/coro/test/async_simple_coro_test 3: Working Directory: /Users/yxb/workspace/async_simple/build/async_simple/coro/test 3: Test timeout computed to be: 10000000 3: Note: Google Test filter = GeneratorTest.testExample 3: [==========] Running 1 test from 1 test suite. 3: [----------] Global test environment set-up. 3: [----------] 1 test from GeneratorTest 3: [ RUN ] GeneratorTest.testExample 3: start 3: foo! 3: bar! 3: bar! 3: unknown file: Failure 3: C++ exception with description "Can't increment generator end iterator" thrown in the test body. 3: 3: [ FAILED ] GeneratorTest.testExample (0 ms) 3: [----------] 1 test from GeneratorTest (0 ms total) 3: 3: [----------] Global test environment tear-down 3: [==========] 1 test from 1 test suite ran. (0 ms total) 3: [ PASSED ] 0 tests. 3: [ FAILED ] 1 test, listed below: 3: [ FAILED ] GeneratorTest.testExample 3: 3: 1 FAILED TEST 3/5 Test #3: run_async_simple_coro_test .......***Failed 0.00 sec test 4 Start 4: run_async_simple_executor_test
Thanks for reporting this. I think we can only comment out these tests (the Generator Test) conditionally if the compiler is apple-clang15. Would you like to contribute that? Since it is not easy for me to test it locally.
from async_simple.
@ChuanqiXu9 umm... I forgot to mention: this issue will result in one of the consequences being that with the latest macos default apple-clang (currently version 15), ctest fails to pass a unit test --
async_simple_coro_test
.3: Test command: /Users/yxb/workspace/async_simple/build/async_simple/coro/test/async_simple_coro_test 3: Working Directory: /Users/yxb/workspace/async_simple/build/async_simple/coro/test 3: Test timeout computed to be: 10000000 3: Note: Google Test filter = GeneratorTest.testExample 3: [==========] Running 1 test from 1 test suite. 3: [----------] Global test environment set-up. 3: [----------] 1 test from GeneratorTest 3: [ RUN ] GeneratorTest.testExample 3: start 3: foo! 3: bar! 3: bar! 3: unknown file: Failure 3: C++ exception with description "Can't increment generator end iterator" thrown in the test body. 3: 3: [ FAILED ] GeneratorTest.testExample (0 ms) 3: [----------] 1 test from GeneratorTest (0 ms total) 3: 3: [----------] Global test environment tear-down 3: [==========] 1 test from 1 test suite ran. (0 ms total) 3: [ PASSED ] 0 tests. 3: [ FAILED ] 1 test, listed below: 3: [ FAILED ] GeneratorTest.testExample 3: 3: 1 FAILED TEST 3/5 Test #3: run_async_simple_coro_test .......***Failed 0.00 sec test 4 Start 4: run_async_simple_executor_test
Thanks for reporting this. I think we can only comment out these tests (the Generator Test) conditionally if the compiler is apple-clang15. Would you like to contribute that? Since it is not easy for me to test it locally.
Sure
from async_simple.
@ChuanqiXu9
I think solution is to conditionally remove GeneratorTest.cpp from Bazel and CMake files.
But should we do more, to prevent users from using Generator.h when compiling with Clang-15, adding like the following to the very top of Generator.h:
#if defined(__clang__)
#if __clang_major__ == 15
#error "Clang 15 is not supported due to some issues."
#endif
#endif
from async_simple.
@ChuanqiXu9 I think solution is to conditionally remove GeneratorTest.cpp from Bazel and CMake files.
But should we do more, to prevent users from using Generator.h when compiling with Clang-15, adding like the following to the very top of Generator.h:
#if defined(__clang__) #if __clang_major__ == 15 #error "Clang 15 is not supported due to some issues." #endif #endif
It sounds good. Maybe a #warning
is better.
from async_simple.
Related Issues (20)
- Deploy static content to Pages task is getting failure HOT 3
- a bug in specifying executors for Future HOT 11
- What about add a new feature lazy_local HOT 6
- Perhaps more information can be exposed to the Executor to guide scheduling HOT 13
- Try.h报错信息拼写错误
- co_await async_simple::coro::sleep() question HOT 4
- how to resume a Yield coro HOT 2
- 可否提供一个客户端异步http请求的例子? HOT 11
- ConditionVariable::notifyOne 可能miss唤醒,
- 請問如何實現類似epoll的模型? HOT 4
- There might be better to use like `asyncio.gather` in example of `StacklessCoroutineAndFuture.md` HOT 1
- coro::ConditionVariable is not aware of Executor HOT 3
- A question about Mutex implementation HOT 3
- GTEST_INCLUDE_DIR-NOTFOUND HOT 2
- how to adapt to callback style API HOT 3
- What are the best practices for cancellation? HOT 1
- 相比于老式的异步编程, switch延时如何? HOT 2
- Mutex unlock这里为啥是原地resume呀 HOT 2
- 怎么在collectAny后再继续等待其他RescheduleLazy执行完毕 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async_simple.