chinedufn / swift-bridge

swift-bridge facilitates Rust and Swift interop.
https://chinedufn.github.io/swift-bridge
Apache License 2.0
842 stars 62 forks source link

Fix non-deterministic generation order #230

Closed NiwakaDev closed 1 year ago

NiwakaDev commented 1 year ago

Related to #225.

Before this commit, the integration tests sometimes fail, like so:

field has incomplete type 'struct swift_bridge$tuple$I32ResultTestOpaqueRustTypeString'

This PR fixes the issue.

NiwakaDev commented 1 year ago

It seems like another issue happens:

Test session results, code coverage, and logs:
    Command CompileSwift failed with a nonzero exit code
    /Users/runner/Library/Developer/Xcode/DerivedData/SwiftRustIntegrationTestRunner-eunjzlpbulmkoedlbxmntxkdbksm/Logs/Test/Run-SwiftRustIntegrationTestRunner-2023.06.17_06-29-48-+0000.xcresult
    Cannot find 'swift_reflect_already_declared_struct' in scope
    Testing cancelled because the build failed.
NiwakaDev commented 1 year ago

I rebased #226 into this branch, and then I fixed the immediately above issue.

NiwakaDev commented 1 year ago

@chinedufn I guess that I addressed your review. But, If we need to support Result<tuple, tuple>, we couldn't yet merge this PR into master.