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

DSL directive to exclude subspecs in the Podfile #40

Closed
swizzlr opened this issue Nov 22, 2013 · 12 comments
Closed

DSL directive to exclude subspecs in the Podfile #40

swizzlr opened this issue Nov 22, 2013 · 12 comments

Comments

@swizzlr
Copy link

swizzlr commented Nov 22, 2013

I shouldn't have to write the following (well, regex it from the lockfile) in order to exclude a single subspec which has a broken dependency:

pod 'libextobjc/EXTADT'
pod 'libextobjc/EXTAnnotation'
pod 'libextobjc/EXTBlockMethod'
pod 'libextobjc/EXTBlockTarget'
pod 'libextobjc/EXTConcreteProtocol'
pod 'libextobjc/EXTDispatchObject'
pod 'libextobjc/EXTFinalMethod'
pod 'libextobjc/EXTKeyPathCoding'
pod 'libextobjc/EXTMaybe'
pod 'libextobjc/EXTMixin'
pod 'libextobjc/EXTMultimethod'
pod 'libextobjc/EXTMultiObject'
pod 'libextobjc/EXTNil'
pod 'libextobjc/EXTPassthrough'
pod 'libextobjc/EXTPrivateMethod'
pod 'libextobjc/EXTProtocolCategory'
pod 'libextobjc/EXTSafeCategory'
pod 'libextobjc/EXTScope'
pod 'libextobjc/EXTSelectorChecking'
pod 'libextobjc/EXTSwizzle'
@alloy
Copy link
Member

alloy commented Nov 22, 2013

I’m of the opinion that we should leave this open for now and see if others have similar needs.

@ethankao
Copy link

ethankao commented Mar 4, 2014

I think the exclude method would be very useful. I need this functionality too.

@fabiopelosin fabiopelosin changed the title podfiles should provide method of excluding subspecs DSL directive to exclude subspecs in the Podfile Apr 3, 2014
@fabiopelosin
Copy link
Member

This has been considered a desirable feature but we are holding off because it the additional complexity is worth it.

@fabiopelosin
Copy link
Member

Blocked by #81

@alloy
Copy link
Member

alloy commented Apr 3, 2014

Agreed.

@alloy
Copy link
Member

alloy commented Apr 3, 2014

As an aside, remember that you can still use Ruby in your Podfile. E.g.

%w{ ADT Annotation BlockMethod }.each do |subspec|
  pod "libextobjc/EXT#{subspec}"
end

@fabiopelosin
Copy link
Member

The directive should allow to exclude any dependency. This more general solution is useful in case you might want to install a fork:

pod 'libA', :exclude => 'depB'
pod 'depBFork'

Also I'm starting to wonder wether the DSL should support a block for the pod directive because the options are becoming overloaded.

pod 'libA', '> 1.0' do
  exclude 'depB'
  git 'example.com'
  head!
end

@AliSoftware
Copy link
Contributor

I'm not fond of the do ... end syntax for this particular case, as blocks generally contains actions to perform. git 'example.com' and head! are not really actions but directives / configuration options, so the do ... end terminology does not fit IMHO

@fabiopelosin
Copy link
Member

Almost none of the attributes specified here are actions, they are a specification/configuration. The git example though looks bad

@AliSoftware
Copy link
Contributor

Good point… Well I'm probably used to see target do ... pod pod pod ... end so it didn't bother me.

But still, pod may eventually be considered as an action like "add the pod to this target" (verb/action), and "exclude" seems ok too. git and head! are much less verbs/actions in that context.

@fabiopelosin
Copy link
Member

Moving to #150

@xysverma
Copy link

I have recently added an easy approach solution for those who are wondering what to do in a locked condition that exclusion of pod dependency is absolutely a must.

https://stackoverflow.com/questions/40659236/is-it-possible-to-exclude-dependency-in-cocoapods/45678424#45678424

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

No branches or pull requests

6 participants