Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Linking a Podfile to a podspec in a different folder will use wrong path to dependency with local pod spec #661

Closed
hartbit opened this Issue · 4 comments

2 participants

@hartbit

It sounds complicated but is not. Imagine a project developed with the recommended folder structure:

.
├── Classes
    └── ios
    └── osx
├── Resources
├── Project
    └── Podfile
├── LICENSE
├── Readme.markdown
├── NAME.podspec
└── DEPENDENCY.podspec

Now the Podfile will look something like this:

platform :ios, '5.0'
podspec :path => '../NAME.podspec'

Now, if the podspec has a dependency with a local podspec:

Pod::Spec.new do |s|
  # Standard stuff
  s.dependency 'DEPENDENCY', :podspec => 'DEPENDENCY.podspec'
end

In that case, the pod update will fail with this error:

No such file or directory - DEPENDENCY.podspec

because it is looking for it in the Podfile folder, but should be actually looking in the podspec's folder.

@fabiopelosin

This could be fixed by keeping track the of the specification that triggered the dependency. However it is unclear to me the usage case. Could you provide some context about why would you used the :podspec option within a podspec file?

@hartbit

In this case, I am pointing towards a podspec I have created on gist. It's there until I am sure it works before adding it to the Specs repo:

s.dependency 'SDURLCache', :podspec => 'https://raw.github.com/gist/4135886/ef797b0ef494c32cc8ff70133f38bf0e4d636bcb/SDURLCache.podspec'

But even if this is not a standard usage case, I still believe it's a bug that should be fixed.

@fabiopelosin

Thanks, for the info, marked as bug.

@fabiopelosin
Owner

The usage of external options in the podspecs has been deprecated. Therefore this issue is not relevant anymore.

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.