Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library should not export XCTestDynamicOverlay #13

Closed
1 of 3 tasks
lukeredpath opened this issue Jan 11, 2023 · 4 comments
Closed
1 of 3 tasks

Library should not export XCTestDynamicOverlay #13

lukeredpath opened this issue Jan 11, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@lukeredpath
Copy link

lukeredpath commented Jan 11, 2023

Description

The @exported import of XCTestDynamicOverlay causes the use of XCTFail in tests and test helpers where you import both XCTest and Dependencies (or something that implicitly imports Dependencies like ComposableArchitecture) to result in a compiler error due to am ambiguous use of XCTFail.

This is effectively a regression of pointfreeco/swift-composable-architecture#747 and I ran into this upgrading from TCA 0.45 to 0.49.

Checklist

  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.

Expected behavior

You should be able to use XCTFail in tests/test helpers without error.

Actual behavior

Fails to compile.

Steps to reproduce

No response

Dependencies version information

0.1.2

Destination operating system

No response

Xcode version information

Xcode 14.2

Swift Compiler version information

No response

@lukeredpath lukeredpath added the bug Something isn't working label Jan 11, 2023
@stephencelis
Copy link
Member

Hey @lukeredpath! Just to get a better understanding of the bug, can you share a repro? We have quite a few suites that import both ComposableArchitecture and XCTest and haven't hit this yet, and it'd be nice to have some regression testing in place for any potential fix.

@lukeredpath
Copy link
Author

BugRepro.zip

Sure - the above project reproduces the error when compiling the test target.

@davdroman
Copy link

Relates to pointfreeco/swift-issue-reporting#45

IMO it'd be a shame to stop exporting XCTDynamicOverlay, so that's why I suggested @_disfavoredOverload.

@stephencelis
Copy link
Member

Fixed upstream, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants