Skip to content

Better error msg for missing podspec #338

Closed
wants to merge 1 commit into from

3 participants

@subdigital

First checks the project's root for a .podspec,
Then goes on to check the Local Pods folder,
if that can't be found raises an informative error.

Currently this breaks a couple of tests, as the behavior for sandbox#podspec_for_name(name) of returning nil apparently is being depended on. Submitting a pull request to begin the discussion.

Do you think this is the right approach?

The tests that are broken:

Pod::Resolver

  • holds the context state, such as cached specification sets [FAILED]
  • returns all specs needed for the dependency [FAILED]

Pod::Command::Spec::Linter

  • uses xcodebuild to generate notes and warnings [FAILED]
  • checks for file patterns [FAILED]

If you think this is the right approach, I'll look at how to fix these specs to not depend on a nil return value from that method.

@subdigital subdigital Raise an informative error for missing podspec.
First checks the project's root for a .podspec,
Then goes on to check the Local Pods folder,
if that can't be found raises an informative error.
bc09972
@fabiopelosin
CocoaPods member

The issue appears to be in AbstractExternalSource#specification_from_sandbox and its interplay with sandbox#podspec_for_name(name).

We could raise in AbstractExternalSource or stop relying on the nil behavior. I, personally, don't have any preference, and I think it is mostly a (subjective) matter of which solution would be more idiomatic.

@fabiopelosin
CocoaPods member

@alloy Any opinion on this?

@alloy
CocoaPods member
alloy commented Jul 23, 2012

I think moving it to the end of AbstractExternalSource#specification_from_sandbox is the better solution. It’s a problem which arises while trying to load the dependency.

@fabiopelosin
CocoaPods member

Implemented by ae569fc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.