Carthage/Carthage

Add option to save inputs to resolver

Aberta

#2.000 aberto em 18 de jun. de 2017

 (1 comentário) (0 reação) (0 responsável)Swift (1.544 forks)batch import
help wanted

Métricas do repositório

Stars
 (15.179 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Resolving dependencies—choosing compatible versions of all the dependencies—is one of the most central and hardest things that Carthage does. These problems are also the hardest to debug when users report issues.

Our tests for the resolver now use a very simple database of tags/versions:

private struct DB {
	// Each available dependency has a dictionary of versions to its dependencies.
	// So if A has version 1.0 that has `B ~> 2.0` in its 1.0 Cartfile, then you'd see this:
	// [ A: [ 1.0: [B: .compatibleWith(2.0)] ] ]
	var versions: [Dependency: [PinnedVersion: [Dependency: VersionSpecifier]]]

        // Dependencies can also have random git references (non-version tags or just SHAs)
	// that point to SHAs.
	var references: [Dependency: [String: PinnedVersion]] = [:]
}

We should add a flag that creates and saves a database like this for the current project's Cartfile. We could change the dependency names to be simple things like A, B, etc., which would anonymize the data a bit.

Then, when users have resolver issues, we could ask them to run this, which would let us easily create and reduce a test.

Guia do colaborador