artsy/eidolon

CocoaPods keep fetching Artsy+UIFonts

hw-in-github opened this issue · 20 comments

I know that in your team you guys use Artsy_UIFonts module, while we use Artsy_OSSUIFonts module when building the oss version.
screen shot 2016-11-16 at 1 48 45 pm
Yet when i execute "fastlane oss" or "pod install", cocoapods keep fetching the Artsy+UIFonts module. Is there a cache somewhere. I've tried to delete Pod.lock, not working?
screen shot 2016-11-16 at 1 48 10 pm

orta commented

is your computers name any of the ones mentioned in the if statement?

no, my computer's name is none of those. Plus, it's fetching both Artsy+UIFonts and Artsy+OSSUIFonts. Haha, i've never notice its capital P in CocoaPods

That's... very strange! It looks like it's installing Artsy+UIFonts as a transitive dependency of some of our other pods, like this one: https://github.com/artsy/Artsy-UIButtons/blob/master/Artsy-UIButtons.podspec . I'm curious why this hasn't been a problem before, but admittedly I just woke up. Any ideas @orta?

orta commented

ah, yeah, I do have an idea actually - CP 1.0+ forces hard dependencies between frameworks.

So we had to not "weak link" in the sense of an ambient look up for the other frameworks to connect with each other ( e.g. if this framework exists use it, otherwise use this one )

I think the answer is to have the buttons Podspec have the same check ENV checks ( maybe move them to the new syntax ) and to make sure we're referencing the .podspec and not a .json version so that the code is eval'd

That makes sense, since we only recently updated from CocoaPods 0.39.

Cool, waiting on those PRs, then I'll push updated podspecs, update to them on eidolon, and we should be 🍏 Thanks for your patience @NSWhoohoo and thanks for opening the issue 🙇

no problem @ashfurrow , so I've change the podspecs locally, and managed to finish the CocoaPods installation sucessfully. But XCode 8.1 complains about the swift 2.3 syntax in Alamofire and others in Pods project. Did you finished with the swift 3 migration yet?

Yeah, we're Swift 3 on master currently, it's not working? I'll have to look into it later 👍

alloy commented

@ashfurrow Nice work on those podspecs 👌

@orta @ashfurrow I have same problem with CP trying run Artsy app in xcode 7.3.1... some suggestion ?

[09:57:22]: $ bundle exec pod install
[09:57:30]:  Analyzing dependencies
[09:57:30]:  Pre-downloading: `DZNWebViewController` from `https://github.com/orta/DZNWebViewController.git`, commit `9121386901af95072fb19eaa3df7060ca46fc337`
[09:57:30]:  Fetching podspec for `Keys` from `Pods/CocoaPodsKeys`
[09:57:30]:  Pre-downloading: `Reachability` from `https://github.com/ashfurrow/Reachability.git`, commit `6db8c29565c319f59174dd63e4b1ac5b471d133a`
[09:57:30]:  Pre-downloading: `UIImageViewAligned` from `https://github.com/ashfurrow/UIImageViewAligned.git`, commit `6f8cb5669b219ef08c90c2e2e5a082cadfe7565b`
[09:57:31]:  Downloading dependencies
[09:57:31]:  Using ARAnalytics (4.0.1)
[09:57:31]:  Using ARCollectionViewMasonryLayout (2.0.0)
[09:57:31]:  Using ARTiledImageView (1.1.1)
[09:57:31]:  Using Action (2.0.0)
[09:57:31]:  Using Alamofire (4.0.1)
[09:57:31]:  Installing Artsy+OSSUIFonts (1.1.0)
[09:57:31]:  Using Artsy+UIColors (3.0.1)
[09:57:31]:  Installing Artsy+UIFonts (1.1.0)
[09:57:33]:  [!] Error installing Artsy+UIFonts
[09:57:33]:  [!] /usr/bin/git clone https://github.com/artsy/Artsy-UIFonts.git /var/folders/zx/y5q5_f0s6459c4kgrnknr40c0000gn/T/d20161117-64821-1rt5g21 --template= --single-branch --depth 1 --branch 1.1.0
[09:57:33]:  Cloning into '/var/folders/zx/y5q5_f0s6459c4kgrnknr40c0000gn/T/d20161117-64821-1rt5g21'...
[09:57:33]:  remote: Repository not found.
[09:57:33]:  fatal: repository 'https://github.com/artsy/Artsy-UIFonts.git/' not found
[09:57:33]: Unable to deploy, resetting git repository. 
orta commented

@douglastaquary you'll have to wait until this issue is closed, that's the problem this issue is about

The real module name of Artsy_OSSUIFonts module is still Artsy_UIFont, so the following lines aren't working

#if __has_include(<Artsy_OSSUIFonts/UIFont+OSSArtsyFonts.h>)
#import <Artsy_OSSUIFonts/UIFont+OSSArtsyFonts.h>
#endif

Xcode complains about No known class method for selector serifFontWithSize

should import <Artsy_UIFonts/UIFont+OSSArtsyFonts.h> instead

Makes sense, you mean here? I'll get to it on Monday, thanks again 👍

@NSWhoohoo Should be fixed now, would you mind pulling and testing?

@ashfurrow Not working, shouldn't it be #import <Artsy_UIFonts/UIFont+OSSArtsyFonts.h> for OSS? These lines caused the problem.

Ah interesting, looks like we'll need to update those libraries again. The header in the OSS pod has the same filename as the non-OSS pod.

Okay, I've updated the Labels pod, it should work now. @NSWhoohoo thanks again for reporting this, and for your patience while we fix it.

I'm getting reports online that people are still seeing this. I'm going to take another look.

Okay, took a look and I've pushed changes to the Artsy Specs repo that should fix things 👍

orta commented

I'm assuming this works 👍 closing