Expand description
Automatic version backtracking for SHA conflict resolution.
This module implements automatic resolution of version conflicts by finding alternative versions that satisfy all constraints and resolve to the same commit SHA.
§Algorithm
When SHA conflicts are detected (multiple requirements for the same resource resolving to different commits), the backtracking resolver attempts to find compatible versions:
- Query available versions: Fetch all tags from the Git repository
- Filter by constraints: Find versions satisfying all requirements
- Try alternatives: Test versions in preference order (latest first)
- Verify SHA match: Check if alternative version resolves to same SHA as other requirements
- Handle transitive deps: Re-resolve transitive dependencies after version changes
- Iterate if needed: Continue until all conflicts resolved or limits reached
§Performance Limits
To prevent excessive computation:
- Maximum 100 version resolution attempts per conflict
- 10-second timeout for entire backtracking process
- Early termination if no progress made
Structs§
- Backtracking
Iteration - State of a single backtracking iteration.
- Backtracking
Resolver - Automatic version backtracking resolver.
- Backtracking
Result - Result of a backtracking attempt.
- Resource
Params - Parameters for adding or updating a resource in the registry.
- Version
Update - Record of a version update made during backtracking.
Enums§
- Termination
Reason - Reason for termination of backtracking.
Functions§
- parse_
resource_ id_ string - Convert a resource_id string (format: “source:path”) into components.
- resource_
id_ to_ string - Convert a ResourceId to the legacy string format “source:name”.