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

Delete old link target when upgrading from 0.39 to 1.0 #5208

Closed
1 task done
skyline75489 opened this issue Apr 28, 2016 · 9 comments
Closed
1 task done

Delete old link target when upgrading from 0.39 to 1.0 #5208

skyline75489 opened this issue Apr 28, 2016 · 9 comments
Labels
s1:awaiting input Waiting for input from the original author

Comments

@skyline75489
Copy link

skyline75489 commented Apr 28, 2016

Report

What did you do?

I upgraded my CocoaPods from 0.39 to 1.0 beta8. I didn't have any target setting in my old Podfile. I add a new target surrounding all my pods in order to follow the new target requirement.

What did you expected to happen?

Everything should just works.

What happened instead?

The compiling part was OK. But the linking part was not. After pod install I now have two libraries in Link Binary With Libraries:

  • libPods.a
  • libPods-MyTarget.a

I had to manually delete the old libPods.a to link those pods successfully.

Podfile

Not really needed in this issue.

@segiddins
Copy link
Member

Can you try running pod deintegrate && pod install and seeing if that fixes things?

@segiddins segiddins added the s1:awaiting input Waiting for input from the original author label Apr 28, 2016
@segiddins
Copy link
Member

If not, we'd need to be able to investigate the project from before you upgraded to 1.0 to try and debug. Thanks!

@skyline75489
Copy link
Author

skyline75489 commented Apr 28, 2016

Turns out pod deintegrate fixed this.

However, my xcodeproj and Podfile are not in the same folder. And pod deintegrate is actually looking for project in the current directory, instead of Podfile. If I do pod deintergrate directly at where my Podfile is, it errors out:

[!] A valid Xcode project file is required.

So I specified the path of xcodeproj and pod deintegrate before pod install. And everything finally works.

Still, I find the need of pod deintegrate vague and confusing. I don't see this in Migration Guide, nor in any command line output.

@segiddins
Copy link
Member

Right, which is why I'm also asking for the project before you upgraded so we can actually see why automatic deintegration didn't happen.

@skyline75489
Copy link
Author

This is a private project I've been working on with my friend. I'll come back later after I make contact with him.

@skyline75489
Copy link
Author

OK. This is the project we've been working on. The iOS project is in Frontend folder. For development we are not tracking Pods/ and Podfile.lock. And we uses a mirror CocoaPods repo.

@segiddins
Copy link
Member

Ah, so it turns out this is intentional: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/installer.rb#L496. It would automatically de-integrate if your xcodeproj was in the root project directory, if not you do need to manually run pod deintegrate

@skyline75489
Copy link
Author

Is this mentioned anywhere in the doc? If not I highly recommend adding this instruction. Or we could just enhance this behaviour by more places other than root directory.

@segiddins
Copy link
Member

We considered glowing in other places, but concluded it would lead to too many false-positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s1:awaiting input Waiting for input from the original author
Projects
None yet
Development

No branches or pull requests

2 participants