-
Notifications
You must be signed in to change notification settings - Fork 194
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
Tests fail in Xcode due to ResourceHelper using wrong path #130
Comments
Yeah, Swift 5.5 is ok. Deployment targets are more important. Thanks for checking this out! I do use sth. like
in our apps as well. Should've thought of this :) |
@Diggory If you should go ahead with this, that's be a good point to release a new version of the library with your other fixes, IMHO |
Sorry - I was on holiday. I'll make a PR. D |
No need to be sorry for taking a week off! Was just looking at things by chance, didn't meant to apply any pressure |
Hello,
I find that when running the tests in Xcode they crash (they don't crash when running the tests from the shell using
swift test
):This appears to be due to
ResourceHelper.url()
which tries to get test CSV files from the test bundle via a hard-coded path} else if let realBundle = Bundle(path: "\(bundle.bundlePath)/../../../../SwiftCSVTests") {
. This fails because Xcode stores derived data in the user's library folder, not the project folder these days.I have a branch which gets rid of ResourceHelper entirely and instead uses
Bundle.module.url(forResource:, withExtension: )
however that requires bumping theswift-tools
version in the package manifest to 5.5 (from 5.0 in main).Would that be acceptable? I assume that this would restrict building the package to using swift version 5.5 or later. (5.5 was released in Sept 2021 and requires Xcode 13 on macOS which requires Big Sur.)
(At the time of writing, the latest version of Swift is 5.8.1)
The text was updated successfully, but these errors were encountered: