-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Tests: use FileManager
instead of cp
#4872
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
Conversation
@swift-ci please smoke test |
@swift-ci please smoke test |
+1 conceptually, need to get CI green. also can localFileSystem help? |
Hmm, |
Ugh, I think that the failure here is due to the |
where an API exists (like in this case), we should use |
@swift-ci please smoke test |
The same problem remains - it wants to de-reference the symbolic links qwhen copying. I'm not sure how to address this portably. I suppose that we can just have two paths for the copying? |
you mean windows/non-windows? we could do that, or would add something to |
Rather than relying on UNIX semantics of `cp` which is inherently platform dependent, prefer the abstractions of `LocalFileSystem.
@swift-ci please smoke test |
@tomerd - any thing holding this up? |
@compnerd I think this is fine if urgent, but I would prefer to see use use a |
I think that the change would be significantly more complex. We would need to re-implement the functionality of |
@compnerd @abertelrud @neonichu what if we added a new function to FileSystem to copy directory which will take some options including (or starting with) following symlinks? feels a bit more scalable that this |
@compnerd, another question: how does this even work on Windows with this patch? I think Windows has adopted symlinks on some of its FSs? |
Yes, I was able to pass the Swift PM test suite with this (and the other remaining patches). The symlink support is really rather flakey and requires a lot of things (including special privileges). Since this is used for the fixtures only, git takes care of the checking out the copy and thus no symbolic links are needed. You cannot simply "copy" a symbolic link. |
I think that I'm going to merge this for now. We are introducing more regressions in the SPM test suite on Windows, and in order to get stability we need to get the tests passing. This allows us to reduce the number of failures so that we can start looking at the failures and getting things into a stable state. |
Rather than relying on UNIX semantics of
cp
which is inherentlyplatform dependent. This is required to start experimenting with
getting the SPM test suite running on Windows.