Skip to content
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

How to declare Cocoapods-art dependency in podspec #8830

Closed
1 task done
TripwireNL opened this issue May 21, 2019 · 12 comments
Closed
1 task done

How to declare Cocoapods-art dependency in podspec #8830

TripwireNL opened this issue May 21, 2019 · 12 comments

Comments

@TripwireNL
Copy link

Report

What did you do?

I tried to setup a private Cocoapod which contains a wrapper for a Cocoapod installed via Cocoapods-art. So I need to add the Cocoapods-art as a dependency in my podspec file

What did you expect to happen?

That I could add the Cocoapods-art plugin + source to the podspec.

What happened instead?

Linter threw an error that there is no plugin method in podspec.

CocoaPods Environment

/Users/user/.cocoapods/repos-art/ios-keycore/.artpodrc

Stack

   CocoaPods : 1.6.0
        Ruby : ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin18]
    RubyGems : 3.0.1
        Host : Mac OS X 10.14.5 (18F132)
       Xcode : 10.2.1 (10E1001)
         Git : git version 2.20.1 (Apple Git-117)
Ruby lib dir : /Users/user/.rbenv/versions/2.6.0/lib
Repositories : ios-keycore -  @ 3c5f7c9fb7b1175e2d6b6c135a110a61ae4fdf19
               master - https://github.com/CocoaPods/Specs.git @ f1c46b35acb522e33cb32883c99bb33c23230d88

Installation Source

Executable Path: /Users/user/.rbenv/versions/2.6.0/bin/pod

Plugins

cocoapods-art         : 1.0.3
cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.3.1
cocoapods-try         : 1.1.0
@dnkoutso dnkoutso added the t4:question This is a question to the maintainers. This could lead into closing the issue or into an enhancement label May 21, 2019
@dnkoutso
Copy link
Contributor

You cannot. It will have to be on installation instructions for your pod.

I could see a DSL to support some "required_plugins" but I dont think it will be implemented anytime soon.

@dnkoutso
Copy link
Contributor

Feel free to provide a proposal and attempt to implement this! See other RFCs like this one #8191

@dnkoutso dnkoutso added s1:awaiting input Waiting for input from the original author and removed t4:question This is a question to the maintainers. This could lead into closing the issue or into an enhancement labels May 22, 2019
@stale stale bot removed the s1:awaiting input Waiting for input from the original author label May 22, 2019
@dnkoutso dnkoutso added t4:question This is a question to the maintainers. This could lead into closing the issue or into an enhancement s1:awaiting input Waiting for input from the original author labels May 22, 2019
@TripwireNL
Copy link
Author

@dnkoutso Thanks, if I have time i'll look into it. Question though, without this private repo my pod doesn't compile when doing pod lib lint. Can I still create a Cocoapod for my wrapper or is it impossible?

@stale stale bot removed the s1:awaiting input Waiting for input from the original author label May 22, 2019
@dnkoutso
Copy link
Contributor

I think your pod must have instructions to include this repo via the plugin in order for it to function.

@dnkoutso
Copy link
Contributor

This issue will remain open but will close in a few days if there is no progress.

@dnkoutso dnkoutso added the s1:awaiting input Waiting for input from the original author label May 22, 2019
@TripwireNL
Copy link
Author

I think your pod must have instructions to include this repo via the plugin in order for it to function.

I know I've added it to the instructions but how do I distribute this pod when I can't get through the pod lib lint since it doesn't compile without that dependency... Or might I be doing something wrong?

@stale stale bot removed the s1:awaiting input Waiting for input from the original author label May 23, 2019
@dnkoutso
Copy link
Contributor

hm true you cannot do that there is no plugins support for pod lib lint and I dont think we want to add this because there is no way to enforce consumers to use the plugin....the only way to do so is via instructions in a README or something...

@dnkoutso dnkoutso added the s1:awaiting input Waiting for input from the original author label May 30, 2019
@segiddins
Copy link
Member

plugin ‘cocoapods-art’ in your Podfile should do the trick

@stale stale bot removed the s1:awaiting input Waiting for input from the original author label Jun 3, 2019
@TripwireNL
Copy link
Author

@segiddins I know for the Podfile this works :) but this still doesn't solve the issue regarding pod lib lint which fails because the dependency on my private cocoapod-art plugin isn't there. Might need to rethink if a pod is the best solution for this.

@orta
Copy link
Member

orta commented Jun 3, 2019

If the Podspec is released as ruby, you could use code to determine if the plugin is set up in the current podfile and fail elegantly with a message. This wouldn't work if you publish it via trunk though, as it only uses JSON Podspecs.

<edit> just realized this is about pod lib lint but yeah, could be useful for pods you host yourself

@dnkoutso dnkoutso added s1:awaiting input Waiting for input from the original author and removed t4:question This is a question to the maintainers. This could lead into closing the issue or into an enhancement labels Jun 23, 2019
@stale stale bot removed the s1:awaiting input Waiting for input from the original author label Jun 23, 2019
@dnkoutso
Copy link
Contributor

I do not think we will be doing any changes here. You can write Ruby for a private repo as @orta said but you cannot use it for trunk since its JSON.

Closing for now as I do not suspect we will do anything here.

@neetin
Copy link

neetin commented Apr 16, 2020

I think your pod must have instructions to include this repo via the plugin in order for it to function.

I know I've added it to the instructions but how do I distribute this pod when I can't get through the pod lib lint since it doesn't compile without that dependency... Or might I be doing something wrong?
@Tripwire999
Did you find any workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants