Closed doozMen closed 2 months ago
Hi @doozMen, I don't think we can accept this PR as-is because people using this library for Apple platforms will suddenly incur the cost of compiling macros when it's not actually needed. Also, according to this thread, Swift Testing is coming to the various Swift toolchains very soon, and so this shouldn't be necessary. In fact, it seems that the swift:nightly
snapshot already has it. Can you try using that snapshot?
I'm going to close this for now, but we are happy to reconsider if there is reason to believe this is the correct way to move forward.
Ok will have to see then how to solve it. I'm using the nightly but I was using nightly-6.0. This seams to suggest I should use the swift:nightly. Will try that then. Thanks for the quick response.
Here's a more polished and professional version of your description that would be suitable for a pull request:
Description of the Issue
On a Linux build where I use
case-paths
, I encountered an issue that required me to add theswift-testing
dependency explicitly. While testing on macOS, I found that this did not conflict with the existing Xcode setup, but to ensure compatibility across both platforms, it seems safest to add the dependency explicitly.This issue arose because I use
swift-testing
in the project, and while it enabled me to run tests on Linux, it caused the build to fail when testing code that usescase-paths
. The failure occurred becausecase-paths
could not importTesting
. I had been usingTesting
for running tests but had not listed it as a dependency in the target that uses it.Solution
To resolve this, I have added
swift-testing
as an explicit dependency for the target usingcase-paths
. This approach ensures the tests run correctly on Linux while maintaining compatibility with macOS. Since the dependency can only be added if it’s listed in the package, I opted to remove the#if
condition to avoid build failures on macOS.By explicitly including the
swift-testing
dependency, this change ensures a smoother experience for both Linux and macOS builds, eliminating issues related to missing dependencies during testing.This more polished version will help present your change more clearly when submitting a pull request. Let me know if you need any adjustments!
The build fail on linux