Pod install fails without for empty targets #765

Closed
gpascale opened this Issue Jan 26, 2013 · 6 comments

Comments

Projects
None yet
4 participants
@gpascale

I ran 'pod install' without having any actual pods in my Podfile, just a target and xcodeproj, and my workspace ended up with only a "Pods" project. My actual project was not there. Adding a single pod fixed it.

@petergoldstein

This comment has been minimized.

Show comment
Hide comment
@petergoldstein

petergoldstein Feb 20, 2013

Contributor

This occurs because of the definition of the user_project_paths method in Pod::Installer::UserProjectIntegrator -

  def user_project_paths
    user_project_paths = @podfile.target_definitions.values.map do |td|
      next if td.empty?
      td.user_project.path #|| raise(Informative, "Could not resolve the Xcode project in which the " \
                           #                      "`#{td.name}' target should be integrated.")
    end.compact
  end

If there are no Pods, then the default TargetDefinition is empty and the user_project_paths array is empty.

I'm working on a patch where this method is moved to the Podfile class, which has more knowledge about a default project.

Contributor

petergoldstein commented Feb 20, 2013

This occurs because of the definition of the user_project_paths method in Pod::Installer::UserProjectIntegrator -

  def user_project_paths
    user_project_paths = @podfile.target_definitions.values.map do |td|
      next if td.empty?
      td.user_project.path #|| raise(Informative, "Could not resolve the Xcode project in which the " \
                           #                      "`#{td.name}' target should be integrated.")
    end.compact
  end

If there are no Pods, then the default TargetDefinition is empty and the user_project_paths array is empty.

I'm working on a patch where this method is moved to the Podfile class, which has more knowledge about a default project.

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Feb 20, 2013

Member

@petergoldstein If you are working on a patch please use the cocoapods-core repo and the 0.17 branch, they are almost ready and they are architecturally very different. Docs can be found here

Member

fabiopelosin commented Feb 20, 2013

@petergoldstein If you are working on a patch please use the cocoapods-core repo and the 0.17 branch, they are almost ready and they are architecturally very different. Docs can be found here

@petergoldstein

This comment has been minimized.

Show comment
Hide comment
@petergoldstein

petergoldstein Feb 20, 2013

Contributor

@irrationalfab - Thanks. I was using this repo. Let me switch over.

Contributor

petergoldstein commented Feb 20, 2013

@irrationalfab - Thanks. I was using this repo. Let me switch over.

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Mar 9, 2013

Member

Related to #840

Member

fabiopelosin commented Mar 9, 2013

Related to #840

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Jun 10, 2013

Member

@petergoldstein did you do any work on this?

Member

fabiopelosin commented Jun 10, 2013

@petergoldstein did you do any work on this?

jzapater pushed a commit to jzapater/CocoaPods that referenced this issue Sep 17, 2013

Merge pull request #765 from agerlic/master
Update PonyDebugger commit version
@kylef

This comment has been minimized.

Show comment
Hide comment
@kylef

kylef Mar 11, 2014

Contributor

Duplicate of #1830.

Contributor

kylef commented Mar 11, 2014

Duplicate of #1830.

@kylef kylef closed this Mar 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment