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

Closed
skyline75489 opened this Issue Apr 28, 2016 · 9 comments

Comments

Projects
None yet
2 participants
@skyline75489

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

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 28, 2016

Member

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

Member

segiddins commented Apr 28, 2016

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

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 28, 2016

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!

Member

segiddins commented Apr 28, 2016

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

This comment has been minimized.

Show comment
Hide comment
@skyline75489

skyline75489 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.

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

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 28, 2016

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.

Member

segiddins commented Apr 28, 2016

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

This comment has been minimized.

Show comment
Hide comment
@skyline75489

skyline75489 Apr 28, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@skyline75489

skyline75489 Apr 28, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 28, 2016

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

Member

segiddins commented Apr 28, 2016

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

@segiddins segiddins closed this Apr 28, 2016

@skyline75489

This comment has been minimized.

Show comment
Hide comment
@skyline75489

skyline75489 Apr 28, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 28, 2016

Member

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

Member

segiddins commented Apr 28, 2016

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