Giter Site home page Giter Site logo

Comments (6)

ChuanqiXu9 avatar ChuanqiXu9 commented on June 9, 2024

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.

faker2048 avatar faker2048 commented on June 9, 2024

@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 avatar ChuanqiXu9 commented on June 9, 2024

@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.

faker2048 avatar faker2048 commented on June 9, 2024

@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.

faker2048 avatar faker2048 commented on June 9, 2024

@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 avatar ChuanqiXu9 commented on June 9, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.