Carthage / Carthage

A simple, decentralized dependency manager for Cocoa
Other
14.95k stars 1.55k forks source link

Carthage update could give different results per run with Swift 4.2 #2487

Open nickmshelley opened 6 years ago

nickmshelley commented 6 years ago

It seems like the order in which dependencies are processed depends on the hash value of the dependency. Since hash values are stable with the current implementation of Swift and Carthage, this "undefined" order remains consistent across runs. However, Swift 4.2 will add random elements to default hashes, which means that the result of carthage update could be different across runs (see https://github.com/apple/swift-evolution/blob/master/proposals/0206-hashable-enhancements.md#proposed-solution).

A side benefit of providing a pre-defined order is it will be easier to create tests that exercise problems that will fail (or pass) consistently.

tmspzz commented 6 years ago

@nickmshelley do you want to submit a PR for this?

See https://github.com/Carthage/Carthage/issues/2488

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ikesyo commented 6 years ago

It seems like the order in which dependencies are processed depends on the hash value of the dependency.

I'm not sure which area you are referring to in the codebase 🤔

And

processed

what does it mean specifically? About fetching or cloning/checkig out or building?

tmspzz commented 6 years ago

IIRC this is about the order in which the resolver considers dependencies