belozierov / SwiftCoroutine

Swift coroutines for iOS, macOS and Linux.
https://belozierov.github.io/SwiftCoroutine
MIT License
836 stars 51 forks source link

UnitTest `CoFutureAwaitTests testNestetAwaits` fail. #17

Closed Guang1234567 closed 4 years ago

Guang1234567 commented 4 years ago

Hello dev:

UnitTest CoFutureAwaitTests testNestetAwaits fail when swift test for this project on macOS 10.14.6. Thanks.


>  swift test

// …

Test Case '-[SwiftCoroutineTests.CoFutureAwaitTests testConcurrency]' started.
Test Case '-[SwiftCoroutineTests.CoFutureAwaitTests testConcurrency]' passed (1.900 seconds).
Test Case '-[SwiftCoroutineTests.CoFutureAwaitTests testNestetAwaits]' started.
Exited with signal code 11
belozierov commented 4 years ago

@Guang1234567 Hi, thank you for your reply.

I have installed macOS 10.14.6 on a virtual machine with Xcode 11.3.1 and all tests run successfully. However, I can't run tests with swift test on a terminal, because I get this error: is using Swift tools version 5.2.0 but the installed version is 5.1.0.

Could you please provide additional information:

Thank you and waiting for you reply.

Guang1234567 commented 4 years ago

@ belozierov

Sorry about that i didn’t provided the env’s detail of this bug.

The step that reproduce the problem ( everytime):

  1. Modify the Package.swift to change the swift-tools-version-5.2 to swift-tools-version-5.1

  2. install swift-5.1.5-RELEASE from swift.org

  3. rm -rf .build/x86_64-apple-macosx

  4. /Library/Developer/Toolchains/swift-5.1.5-RELEASE.xctoolchain/usr/bin/swift test

Thanks.

In addition, i also drop the Combine for Swif-Android-Toolchain-5.2.3 to support android platform.

But i think it's not bussiness about that bug, because master and release_2.1.2 branch also reproduce the problem

My fork is here:

https://github.com/Guang1234567/SwiftCoroutine/tree/Without_Combine

Note: Without_Combine branch

Guang1234567 commented 4 years ago

BTW, i also try the swift-5.2.3-RELEASE, but all unittest passed O(∩_∩)O hahaha!

The step:

  1. Modify the Package.swift to change the swift-tools-version-5.2 to swift-tools-version-5.1

  2. install swift-5.2.3-RELEASE from swift.org

  3. rm -rf .build/x86_64-apple-macosx

  4. /Library/Developer/Toolchains/swift-5.2.3-RELEASE.xctoolchain/usr/bin/swift test

Thanks.

Guang1234567 commented 4 years ago

5.1.5 toolchain fail snapshot

image

image

Guang1234567 commented 4 years ago

5.2.3 toolchain success snapshot

image

image

belozierov commented 4 years ago

@Guang1234567 I reproduced this issue following your steps on Swift 5.1.5. It's really strange because when I run tests on Xcode 11.3.1 with Swift 5.1.3 everything is okay. Also want to highlight that Swift 5.1.5 is for Linux usage but not for macOS.

I experimented and found out that most probably the problem is in @inlinable, which I use for better performance and don't plan to drop it. That's why I will increase the minimal required version of Swift to 5.2.

Currently, I am planning to support only the latest Swift version, as I have no possibility to always test on previous versions.

Thank for reaching out. If the issue with Swift 5.1.5 is really critical for you, please let me know.

Guang1234567 commented 4 years ago

@belozierov

The issue with Swift 5.1.5 is not really critical for me, hahaha.

Thanks.

But could you use OpenCombine instead of Combine if you have time off, hahaha.

That will save someone’s time who works on Linux and Android and macOS. 😁