pointfreeco / swift-issue-reporting

Report issues in your application and library code as Xcode runtime warnings, breakpoints, assertions, and do so in a testable manner.
https://www.pointfree.co
MIT License
368 stars 60 forks source link

XCTestDynamicOverlay linking errors #100

Closed ryanmeisters closed 1 month ago

ryanmeisters commented 1 month ago

Howdy! We are struggling a bit with the change from xctest-dynamic-overlay to swift-issue-reporting with the linking errors below. Indeed, I don't see a dependency for the xcteest-dynamic-overlay product in the TCA Package.swift, so I am confused.

Doesn't sound like anyone else is having this issue so maybe it's something with our setup. I'm still investigating but any thoughts would be greatly appreciated!

ld: Undefined symbols:
  XCTestDynamicOverlay._XCTIsTesting.getter : Swift.Bool, referenced from:
      ComposableArchitecture.StackState.subscript.setter : (id: ComposableArchitecture.StackElementID, fileID: ComposableArchitecture._HashableStaticString, filePath: ComposableArchitecture._HashableStaticString, line: Swift.UInt, column: Swift.UInt) -> A? in ComposableArchitecture.o
      ComposableArchitecture.StackState.subscript.setter : (id: ComposableArchitecture.StackElementID, fileID: ComposableArchitecture._HashableStaticString, filePath: ComposableArchitecture._HashableStaticString, line: Swift.UInt, column: Swift.UInt) -> A? in ComposableArchitecture.o
      ComposableArchitecture.StackElementID.init(integerLiteral: Swift.Int) -> ComposableArchitecture.StackElementID in ComposableArchitecture.o
  XCTestDynamicOverlay.XCTFail(_: Swift.String, file: Swift.StaticString, line: Swift.UInt) -> (), referenced from:
      (extension in ComposableArchitecture):ComposableArchitecture.Change.assertUnchanged() -> () in ComposableArchitecture.o
mbrandonw commented 1 month ago

Hi @ryanmeisters, we haven't see this yet so it would be helpful if you could provide a minimal project that demonstrates the problem.

stephencelis commented 1 month ago

@ryanmeisters Can you point your TCA to this branch to confirm if it resolves the issue for you? https://github.com/pointfreeco/swift-composable-architecture/pull/3256

stephencelis commented 1 month ago

This should be fixed in TCA 1.12.1.

ryanmeisters commented 1 month ago

Thank you! It looks like that fixed the _XCTIsTesting symbol but not XCTFail. I'm still getting this:

ld: Undefined symbols:
  XCTestDynamicOverlay.XCTFail(_: Swift.String, file: Swift.StaticString, line: Swift.UInt) -> (), referenced from:
      (extension in ComposableArchitecture):ComposableArchitecture.Change.assertUnchanged() -> () in ComposableArchitecture.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It appears to be due to our use of an umbrella framework for TCA. I was able to repro in a new project

TCATest.zip

stephencelis commented 1 month ago

@ryanmeisters Can you try https://github.com/pointfreeco/swift-composable-architecture/pull/3258?

ryanmeisters commented 1 month ago

sure thing. trying now!

ryanmeisters commented 1 month ago

yep that worked! woot. thank you!!  🙏🏼 🙏🏼