Carting
Carting copied to clipboard
Needs to include content of Cartfile.private
Hi,
This looks like a great tool, and very keen to use it. Only problem right now is it doesn't include the contents of Cartfile.private, so currently have to manually add these.
Hi, @itsthejb! Thank you so much for the feedback! Honestly, I've never used Cartfile.private. Could you please share any examples with it? Maybe open source projects. As I understand, Carting should additionally check Cartfile.private and add a path for dependencies from it, right?
Hi there,
It's pretty simple - it just affects how transitive dependencies are resolved. e.g. you would include dependencies in there that are only used with the current project. For example, adding testing dependencies. If included in the main Cartfile
these would be resolved "upwards".
So in terms of this tool, you would always want to include those.
Example at ComponentKit. They have all their testing dependencies in there
Thanks for the example! I'll try to implement it and send you a PR if you don't mind.
Ok thanks!
I don't see Carthage build phase in ComponentKit. Did I miss something?
You mean in the Xcode project? I have no idea, haven't used that project for years. However, there is nothing mysterious about the .private
file. Are you reading the dependencies from Cartfile
only? Seems you would probably better read from Cartfile.resolved
, since those are all the frameworks in use in the local context, whether "public" or .private
Carting reads linked frameworks in all targets. If it exists in Carthage/Build/iOS folder, Carting adds related paths. Carting don't use Cartfile for dependencies check.
I'll give this a double check during the week...
Hi,
So back to the project from which I originally made this issue:
Cartfile
github "https://<internal dependency>"
github "https://<internal dependency>"
github "Swinject/Swinject" ~> 2.4.1
github "kandelvijaya/Kekka" ~> 0.8
Cartfile.private
github "Khan/SwiftTweaks" ~> 4.0.3
github "Swinject/SwinjectStoryboard" ~> 2.1.0
github "onevcat/Kingfisher" == 5.4.0
github "https://github.com/uber/ios-snapshot-test-case" ~> 6.0.3
github "https://<internal dependency>"
github "https://<internal dependency>"
After running Carthage update, I have the following .frameworks
built in Carthage/Build/iOS
:
Carthage/Build/iOS/AsyncDisplayKit.framework
Carthage/Build/iOS/Kingfisher.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/SwiftTweaks.framework
Carthage/Build/iOS/SDWebImageMapKit.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/FBSnapshotTestCase.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/Kekka.framework
Carthage/Build/iOS/ZNetworking.framework
Carthage/Build/iOS/SwinjectStoryboard.framework
Carthage/Build/iOS/SDWebImage.framework
Carthage/Build/iOS/Swinject.framework
Running carting update
will produce:
$(SRCROOT)/Carthage/Build/iOS/AsyncDisplayKit.framework
$(SRCROOT)/Carthage/Build/iOS/Kekka.framework
$(SRCROOT)/Carthage/Build/iOS/Kingfisher.framework
$(SRCROOT)/Carthage/Build/iOS/Swinject.framework
$(SRCROOT)/Carthage/Build/iOS/SwinjectStoryboard.framework
$(SRCROOT)/Carthage/Build/iOS/ZDS.framework
$(SRCROOT)/Carthage/Build/iOS/ZDSNodes.framework
$(SRCROOT)/Carthage/Build/iOS/ZNetworking.framework
Therefore it seems that the actual issue is that the dependencies missed are all our internal dependencies, specified with github "https://..."
🤷♂
Please let me know what you think
Did you link any of private dependencies to any target?
On Mon, 29 Apr 2019 at 16:28, Jonathan Crooke [email protected] wrote:
Hi,
So back to the project from which I originally made this issue: Cartfile
github "https://
" github "https://
" github "Swinject/Swinject" ~> 2.4.1
github "kandelvijaya/Kekka" ~> 0.8
Cartfile.private
github "Khan/SwiftTweaks" ~> 4.0.3
github "Swinject/SwinjectStoryboard" ~> 2.1.0
github "onevcat/Kingfisher" == 5.4.0
github "https://github.com/uber/ios-snapshot-test-case" ~> 6.0.3
github "https://
" github "https://
" After running Carthage update, I have the following .frameworks built in Carthage/Build/iOS:
Carthage/Build/iOS/AsyncDisplayKit.framework
Carthage/Build/iOS/Kingfisher.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/SwiftTweaks.framework
Carthage/Build/iOS/SDWebImageMapKit.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/FBSnapshotTestCase.framework
Carthage/Build/iOS/<Internal>.framework
Carthage/Build/iOS/Kekka.framework
Carthage/Build/iOS/ZNetworking.framework
Carthage/Build/iOS/SwinjectStoryboard.framework
Carthage/Build/iOS/SDWebImage.framework
Carthage/Build/iOS/Swinject.framework
Running carting update will produce:
$(SRCROOT)/Carthage/Build/iOS/AsyncDisplayKit.framework
$(SRCROOT)/Carthage/Build/iOS/Kekka.framework
$(SRCROOT)/Carthage/Build/iOS/Kingfisher.framework
$(SRCROOT)/Carthage/Build/iOS/Swinject.framework
$(SRCROOT)/Carthage/Build/iOS/SwinjectStoryboard.framework
$(SRCROOT)/Carthage/Build/iOS/ZDS.framework
$(SRCROOT)/Carthage/Build/iOS/ZDSNodes.framework
$(SRCROOT)/Carthage/Build/iOS/ZNetworking.framework
Therefore it seems that the actual issue is that the dependencies missed are all our internal dependencies, specified with github "https://..." 🤷♂
Please let me know what you think
— You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub https://github.com/artemnovichkov/Carting/issues/44#issuecomment-487529983, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGRJTJMPKOWRJ2ZDPAKGBDPS3EUHANCNFSM4HIK7DVQ .
--
Artem Novichkov
mssg.me/novichkov
Back looking at this.
In the case of this project, the missing dependencies are actually linked to test bundle(s), since we don't usually use a TEST_HOST
. If Carting reads the project, then it seems like it should consider test bundles, and this is the missing piece?
You should not add Carthage script to test targets as I know.
Well actually we embed frameworks inside our test bundles, using a Copy Files
build stage:
This works well and removes the need to have a stub .app
target which is just a host...