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

Add tool for checking podspec #4

Closed
soffes opened this issue Sep 18, 2011 · 9 comments
Closed

Add tool for checking podspec #4

soffes opened this issue Sep 18, 2011 · 9 comments
Milestone

Comments

@soffes
Copy link

soffes commented Sep 18, 2011

As we're all trying to help build the podspec repo, it would be great if there was a way to make sure a podspec is formatted correctly and can compile. Currently this is manual process (if tested at all). It would be great if there was a handy tool for this :)

@alloy
Copy link
Member

alloy commented Sep 18, 2011

Indeed. I’ve drafted the banner for a pod spec command a while ago which includes such an idea. I hope to be able to implement it this week.

Regarding the other ones, the create subcommand should do what init does, no more. Need to keep it simple, people can generate Xcode projects just fine through Xcode :)

@alloy
Copy link
Member

alloy commented Sep 19, 2011

Also, to ensure that the spec actually produces a usable lib, the lint command should probably also generate a simple source file that imports all headers with an xcode project and workspace that links libPods.a in.

@soffes
Copy link
Author

soffes commented Sep 19, 2011

Ya, that's what I was getting at since you can compile in Terminal. It would be great if the tool make sure it actually compiled.

@alloy
Copy link
Member

alloy commented Sep 19, 2011

For now I’ve at least made spec lint check for required attributes, as well as adding a command to create stub podspec files: https://github.com/alloy/cocoapods/blob/master/lib/cocoapods/command/spec.rb

@ghost ghost assigned betamike Nov 8, 2011
@alloy
Copy link
Member

alloy commented Nov 8, 2011

23:44 alloy: Ok, so, currently it performs this method: https://github.com/alloy/cocoapods/blob/master/lib/cocoapods/specification.rb
23:44 alloy: It’s very naive
23:45 alloy: I think it should do a bit of type checking, and that a `source' contains the proper keys
23:45 alloy: Things like that
23:45 alloy: Then as the cherry on the pie a sort integration test as discussed on the ticket
23:47 alloy: It should probably create a Podfile (in memory), add a dependency on the spec and install it. Then generate a project and a simple source file which imports a header and possibly does some compiling. To ensure that the actual thing builds and loads.
23:48 alloy: That's about it.
23:49 alloy: Unless you have any more ideas?
23:49 betamike: Ok, that sounds like a good chunk for me to dive into.
23:49 alloy: Awesome :)
23:49 betamike: Calling out to xcodebuild is ok for the latter portion?
23:50 alloy: Definitely, it _should_, as we need to ensure that Xcode is able to compile the lib

@alloy
Copy link
Member

alloy commented Nov 15, 2011

It should also check that the dependencies specified in the spec exist, but this will probably be handled by creating a build, that references the pod headers or so, as well.

@fabiopelosin
Copy link
Member

Closing as implemented in 1161684

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013
@quique123
Copy link

The github project for the command line tool is broken. Im getting here because of a error when typing in pod setup. I did use cocoa pods in many other projects before, dunno what happened from about a month ago

@orta
Copy link
Member

orta commented Apr 21, 2014

please don't comment on 3 year old issues, the answer to your question is probably this: http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/

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

6 participants