Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rename the `local` option of the Podfile to `path` #971

Closed
fabiopelosin opened this Issue · 15 comments

5 participants

@fabiopelosin

It would be consistent with Bundler and a more appropriate name.

@supermarin
Collaborator

solved in CocoaPods/Core#16

@supermarin supermarin closed this
@supermarin supermarin reopened this
@jasl8r

Using the :path option doesn't work for me. It looks like :local is used exclusively in a few places, in particular in podspec_path:

https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/external_sources.rb#L343

@fabiopelosin

@jasl8r Are you using CocoaPods head?

@jasl8r

Yes, with a very simple setup it fails.

Directory structure:

src/Podfile
src/Project.xcodeproj
src/libone
src/libone/one.podspec
src/libone/src/...

Podfile:

pod 'one', :path => 'libone'

Installation fails:

pod install --no-repo-update --verbose

Analyzing dependencies

Fetching external sources
-> Fetching podspec for `one` from ``
[!] No podspec found for `one` in ``

/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/external_sources.rb:351:in `podspec_path'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/external_sources.rb:323:in `block in fetch'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/user_interface.rb:73:in `titled_section'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/external_sources.rb:322:in `fetch'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer/analyzer.rb:258:in `block (2 levels) in fetch_external_sources'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer/analyzer.rb:256:in `each'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer/analyzer.rb:256:in `block in fetch_external_sources'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/user_interface.rb:52:in `section'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer/analyzer.rb:255:in `fetch_external_sources'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer/analyzer.rb:55:in `analyze'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer.rb:167:in `analyze'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer.rb:92:in `block in resolve_dependencies'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/user_interface.rb:52:in `section'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer.rb:91:in `resolve_dependencies'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/installer.rb:84:in `install!'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/command/project.rb:40:in `run_install_with_update'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/command/project.rb:70:in `run'
/Users/jasl8r/.rvm/gems/ruby-1.9.3-p392/gems/claide-0.2.0/lib/claide.rb:535:in `run'
/Users/jasl8r/Development/cocoapods/CocoaPods/lib/cocoapods/command.rb:48:in `run'
/Users/jasl8r/Development/cocoapods/CocoaPods/bin/pod:16:in `<main>'

With :local everything is fine.

Updating the declared_path value to use the :local or :path value solves the initial installation failure. However, changing the Podfile to add another dependency, and re-running pod install causes a different failure. Interestingly, pod update succeeds with this change.

@alloy
Owner

Yeah those occurrences should be updated as well.

/cc @mneorr

@fabiopelosin

@jasl8r, sorry... you obviously are using CocoaPods head. Can you verify that my patch actually fixes the issue?

@jasl8r

Looks good, thanks.

@supermarin
Collaborator

@irrationalfab thanks for fixing, I was out these days

@proger

what's the reason for deprecating this?

@fabiopelosin

The feature was not deprecated it was just renamed to follow the Bundler convention. Also the new name is more informative.

@proger

[!] The :local option of the Podfile has been renamed to :path and is deprecated.

That's what pod says.

@fabiopelosin

The deprecation just refers to the old syntax and not to the feature.

@proger

gotcha, thanks. the changelog entry is a bit frustrating though. :)

@fabiopelosin

I've improved it :-) (the other day but I've forgot to comment).

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.