Open andreabusi opened 1 month ago
We have the same setup (prepare_command
that interacts with a git submodule) and have the same issue since v1.16.0.
could be that this pod just doesn't work with xcodeproj
1.26.0?
I had similar issues and ensuring to work with a cocoapods version that works with a xcodeproj
up to 1.25.0
fixed it
might be a different issue, though
could be that this pod just doesn't work with
xcodeproj
1.26.0?I had similar issues and ensuring to work with a cocoapods version that works with a
xcodeproj
up to1.25.0
fixed itmight be a different issue, though
I've just tried to fix the xcodeproj
version, but the issue still occours.
I think that the issue has been introduced by the usage of rsync
instead of FileUtils
package. Inspecting this commit, the .git
folder is excluded from the rsync, that cause the issue.
The folder is removed after git download. I have checked, while it was processing the first step and it was there. After moving the result into cache, .git
folder was not present anymore.
I created a test version of the CocoaPods gem removing the --exclude=.git
option and it seems to work properly. Here is my branch: https://github.com/andreabusi/CocoaPods/tree/fix/fix_rsync_git_folder
I don't know if it's the right approach. @amorde could you please help us to identify if the option --exclude=.git
in your commit is done by a purpouse or we can remove it?
that was added by @justinseanmartin to fix a performance issue, and I believe removing it would effectively break that optimization. I'm not familiar enough with the issue to know for sure though.
that was added by @justinseanmartin to fix a performance issue, and I believe removing it would effectively break that optimization. I'm not familiar enough with the issue to know for sure though.
Thanks for the reply. I understand that the fix has been added for a reason, but the side effects are quite huge, because a lot of pods depends from the .git
folder. How can we manage it?
Any update on this? The issue is becoming very critical for us
/cc @justinseanmartin @amorde
Report
What did you do?
We have a custom pod that use the
prepare_command
option to execute a script. That script performs some operations in order to install some dependencies and update a git submodule contained in the repo.This pod works properly until CocoaPods v1.15.2, but it's broken with v1.16 (and 1.16.1).
To replicate the issue, we recreate a sample that mimic our configuration:
cocoapods-gitissue.git
: repo with a Podspec that has a submodulecocoapods-gitissue-cpplib.git
: C++ library that is included as submodule in the PodIn the sample project, we created this
Podfile
:Executing
pod install
using CocoaPods v1.16 doesn't work.We already investigate and the issue seems related to this change, that didn't copy the
.git
folder in thecache
directory: https://github.com/CocoaPods/CocoaPods/pull/12349/commits/bc5fdc61839bee9d58c5b04504e6e0cbabbe15c9What did you expect to happen?
We expect that the pod is properly installed (as in CocoaPods v1.15.x)
What happened instead?
pod install
fails with an error:CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
cocoapods-gitissue.git
: repo with a Podspec that has a submodulecocoapods-gitissue-cpplib.git
: C++ library that is included as submodule in the Pod