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

inherit! :search_paths broken in 1.0.0.beta.4 for abstract targets #4943

Closed
1 task done
benasher44 opened this issue Feb 24, 2016 · 4 comments
Closed
1 task done

inherit! :search_paths broken in 1.0.0.beta.4 for abstract targets #4943

benasher44 opened this issue Feb 24, 2016 · 4 comments
Assignees
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!

Comments

@benasher44
Copy link
Member

Report

Previous to this release, you could could use inherit! :search_paths in an abstract_target, and all of its child targets (at least immediately children) would inherit the search paths of the abstract_target's parent. This is useful when you have multiple test targets that share common testing pods and need to inherit search paths from the app under test.

What did you do?

Attempt to build and run the tests in this project, wherein one of the tests imports a header from a pod included for the app.

What did you expected to happen?

The tests would build and run.

What happened instead?

The test bundle failed to compile because it could not find the pod's header.

Podfile

abstract_target 'SharedDeps' do
  pod 'AFNetworking'

  target 'InheritSearchPathsBroken' do
    abstract_target 'TestsShared' do
      inherit! :search_paths
      pod 'OCMock'
      target 'InheritSearchPathsBrokenTests'
    end
  end

  target 'InheritSearchPathsBroken WatchKit 1 Extension'
end

I have a sample xcode project coming soon to Github. I'll comment on this issue as soon as it's posted.

@benasher44
Copy link
Member Author

Sample project posted here: https://github.com/benasher44/CocoaPods4943

Repro steps in this project:

  1. bundle install and pod install
  2. With the InheritSearchPathsBroken target selected (with any valid iOS simulator), attempt to run the sample test suite

It should error in InheritSearchPathsBrokenTests.m trying to #import <AFNetworking/AFNetworking.h>

@segiddins segiddins added t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! s2:confirmed Issues that have been confirmed by a CocoaPods contributor d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase labels Feb 24, 2016
@segiddins segiddins self-assigned this Feb 24, 2016
@segiddins
Copy link
Member

Thanks, working on a fix

@benasher44
Copy link
Member Author

@segiddins awesome thanks!

@segiddins segiddins added s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member and removed s2:confirmed Issues that have been confirmed by a CocoaPods contributor labels Feb 25, 2016
@benasher44
Copy link
Member Author

CocoaPods/Core#308 fixes it for us. Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
d2:moderate A moderately-difficult ticket that may require a bit of knowledge about the codebase s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

No branches or pull requests

2 participants