Quick / Nimble

A Matcher Framework for Swift and Objective-C
https://quick.github.io/Nimble/documentation/nimble/
Apache License 2.0
4.8k stars 596 forks source link

Discussion about the project setup and Carthage usage #1097

Closed stonko1994 closed 8 months ago

stonko1994 commented 9 months ago

[!NOTE] This is not a bug report, but I would like to kick off a discussion about the current project setup and the usage of Carthage.

Motivation: I'm currently trying to add visionOS support to the Quick ecosystem. This includes Nimble, CwlPreconditionTesting and CwlCatchException.

I found some inconsistencies depending on which package manager is used. When using SPM, the dependencies to the Cwl* packages are included through transitive dependencies as expected. However, when using CocoaPods, there is no dependency on any Cwl* package. Instead, it uses the Carhtage checkout files, included in git. CwlPreconditionTesting and CwlCatchException would have CocoaPods and Carthage support.

The problem which comes with this becomes visible in https://github.com/Quick/Nimble/pull/948. In this PR, the dependencies were updated as usual. However, it required an additional 'revert' commit (b03a82) to fix build issues.

These additional required changes are not documented and are hard to figure out. In an ideal scenario, one could update and use the dependencies without touching them.

Proposal: It feels weird to include the Carthage/Checkouts folder in git history when everything should be prepared for use through transitive dependencies. Therefore, to improve the developer experience and simplify contribution, I suggest switching to transitive dependencies for CocoaPods and Carthage as well.


Environment

List the software versions you're using:

Please also mention which package manager you used and its version. Delete the other package managers in this list:

younata commented 9 months ago

It feels weird to include the Carthage/Checkouts folder in git history when everything should be prepared for use through transitive dependencies. Therefore, to improve the developer experience and simplify contribution, I suggest switching to transitive dependencies for CocoaPods and Carthage as well.

100% agree. It's definitely weird/non-standard to include the Carthage/Checkouts folder in git. Doing some spelunking, it appears we used to directly embed the source code, and pulling them in through Carthage was just a way to simplify keeping them updated. It would definitely be worthwhile to fix this and pull these in transitively.

younata commented 8 months ago

Fixed in https://github.com/Quick/Nimble/pull/1108