Open soumyamahunt opened 2 years ago
Interesting, they are documented as being available in the podfile: https://guides.cocoapods.org/syntax/podfile.html#pre_integrate - looks like a bug, open to PRs
Interesting, they are documented as being available in the podfile: https://guides.cocoapods.org/syntax/podfile.html#pre_integrate - looks like a bug, open to PRs
@orta I will be happy to help out, but I need some guidance:
pre_integrate
after this line?
https://github.com/CocoaPods/CocoaPods/blob/3eb1bd365b97af2677e80531f77310c4bb69d9bd/lib/cocoapods/installer.rb#L182post_integrate
after this line?
https://github.com/CocoaPods/CocoaPods/blob/3eb1bd365b97af2677e80531f77310c4bb69d9bd/lib/cocoapods/installer.rb#L930Oh, you want plugins to have extra hooks - sorry, I read this the other way. I guess I still don't see a problem with adding this, I feel like there might be other hooks which handle the same point ( for example cocoapods-keys happens pre-integrate I thought) but your implementation kinda sounds alright.
I'd recommend first writing some tests and then just giving it a stab
Oh, you want plugins to have extra hooks - sorry, I read this the other way. I guess I still don't see a problem with adding this, I feel like there might be other hooks which handle the same point ( for example cocoapods-keys happens pre-integrate I thought) but your implementation kinda sounds alright.
I'd recommend first writing some tests and then just giving it a stab
@orta is there any reason for these hooks not being available for plugins? I wasn't even aware that these hooks aren't available for plugins, since I couldn't find anything on docs regarding this and I can see the unit test cases for all the plugin hooks including pre_integrate
and post_integrate
:
https://github.com/CocoaPods/CocoaPods/blob/7577294cd5e6594bd7d6e84f2048fd792a7c520d/spec/unit/installer_spec.rb#L1033 https://github.com/CocoaPods/CocoaPods/blob/7577294cd5e6594bd7d6e84f2048fd792a7c520d/spec/unit/installer_spec.rb#L1040 https://github.com/CocoaPods/CocoaPods/blob/7577294cd5e6594bd7d6e84f2048fd792a7c520d/spec/unit/installer_spec.rb#L1048 https://github.com/CocoaPods/CocoaPods/blob/7577294cd5e6594bd7d6e84f2048fd792a7c520d/spec/unit/installer_spec.rb#L1056
Also, can you point me how you are using pre_integrate
hooks in cocoapods-keys
I only found pre_install
and post_install
hooks.
I think those were missed and not invoked for plugins.
I think those were missed and not invoked for plugins.
@dnkoutso thanks for clarifying, is there any existing work on resolving this or should I create a PR?
Report
What did you do?
I tried to create CocoaPods plugin with
pre_integrate
andpost_integrate
hooks.What did you expect to happen?
I expected these hooks to be run just like it runs for
pre_integrate
andpost_integrate
hooks inPodfile
.What happened instead?
None of the hooks was executed.
CocoaPods Environment
Stack
Installation Source
Plugins
Podfile
Additional observations
I noticed the following functions are defined to call
pre_integrate
andpost_integrate
hooks for plugins respectively. But I couldn't find these functions called from any where. Are these hooks intentionally disabled for plugins? I couldn't find any info in docs regarding this. https://github.com/CocoaPods/CocoaPods/blob/3eb1bd365b97af2677e80531f77310c4bb69d9bd/lib/cocoapods/installer.rb#L703 https://github.com/CocoaPods/CocoaPods/blob/3eb1bd365b97af2677e80531f77310c4bb69d9bd/lib/cocoapods/installer.rb#L726