title: po in Xcode console not working when sharing Carthage dependencies
body: <ul>
  <li>Are your carthage dependencies checked in?: YES</li>
  <li>carthage install method: [ ] .pkg, [x] homebrew, [ ] source</li>
  <li><code>which carthage</code>: /usr/local/bin/carthage</li>
  <li><code>carthage version</code>: 0.38.0</li>
  <li><code>xcodebuild -version</code>: Xcode 12.5, Build version 12E262</li>
  <li>Are you using <code>--no-build</code>? NO</li>
  <li>Are you using <code>--no-use-binaries</code>? YES</li>
  <li>Are you using <code>--use-submodules</code>? NO</li>
  <li>Are you using <code>--cache-builds</code>? NO</li>
  <li>Are you using <code>--new-resolver</code>? YES</li>
  <li>Are you using <code>--use-xcframeworks</code>? YES</li>
  </ul>
  <p><strong>Cartfile</strong></p>
  <pre><code>binary &quot;https://raw.githubusercontent.com/Snapchat/snap-kit-carthage/repo/SCSDKCreativeKit.json&quot;    == 1.6.5
  binary &quot;https://raw.githubusercontent.com/Appboy/appboy-ios-sdk/master/appboy_ios_sdk.json&quot;         == 4.3.2
  github &quot;SDWebImage/SDWebImage&quot;                                                                      &quot;5.8.2&quot;
  github &quot;https://github.com/SourcePointUSA/ios-cmp-app.git&quot;                                          &quot;5.2.3&quot;
  github &quot;facebook/facebook-ios-sdk&quot;                                                                  &quot;v9.2.0&quot;
  
  github &quot;google/promises&quot;                                                                            &quot;1.2.12&quot;
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebaseABTestingBinary.json&quot;                == 7.4.0
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json&quot;             == 7.4.0
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json&quot;              == 7.4.0
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json&quot;                == 7.4.0
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json&quot;             == 7.4.0
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json&quot;              == 7.4.0
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebaseGoogleSignInBinary.json&quot;             == 7.4.0
  binary &quot;https://dl.google.com/dl/firebase/ios/carthage/FirebaseProtobufBinary.json&quot;                 == 7.4.0
  </code></pre>
  <p><strong>Carthage Output</strong></p>
  <pre><code>Builds fine
  </code></pre>
  <p><strong>Actual outcome</strong>
  <code>po</code> in the console does not work. It errors with:</p>
  <pre><code>error: virtual filesystem overlay file '/Users/&lt;username&gt;/Library/Caches/org.carthage.CarthageKit/DerivedData/12.5.1_12E507/facebook-ios-sdk/v9.2.0/Build/Intermediates.noindex/FBSDKCoreKit.build/Release-iphonesimulator/FBSDKCoreKit-Dynamic.build/all-product-headers.yaml' not found
  
  error: couldn't IRGen expression. Please check the above error messages for possible root causes.
  </code></pre>
  <p><strong>Expected outcome</strong>
  <code>po</code> should work.</p>
  <p>I've come across <a href="https://github.com/Carthage/Carthage/issues/924" rel="nofollow noreferrer">past issues</a>, which seem similar to mine but they seem to be from a long time ago. From my understanding, this could be caused by the fact that we have the Carthage dependencies checked into the repo. The Carthage binaries contain absolute paths to the last developers machine that ran <code>carthage bootstrap / update</code>, as can be seen from the error log above. From reading a few articles, such as <a href="https://steipete.com/posts/couldnt-irgen-expression/" rel="nofollow noreferrer">this one</a>, it seems that checking in the dependencies is not a good idea since we pass <code>--no-use-binaries</code>. Could someone confirm this as bad practice? I see mixed advice on whether to check the dependencies in.</p>
  <p>Since not checking in the dependencies implies caching them on CI, it would be quite a disruptive change that I'd like to avoid if there's any decent workarounds. I've tried git ignoring (and <code>git rm</code> ing) the <code>.bcsymbolmap</code> and <code>.dSYM</code> files that come with the dependencies, since a search shows that this is where the absolute paths can be found but this doesn't fix the issue.</p>
  <p>The only thing that seems to work is building the dependencies again locally using carthage.</p>
  <p>ps: this started as an Issue on the Carthage repo but seems more like a SO questions</p>