Carthage Parser Improvements
April 20, 2026 ยท View on GitHub
Summary
Rust now ships static Carthage support for Cartfile, Cartfile.private, and Cartfile.resolved even though the Python ScanCode reference still has no production Carthage parser.
The supported surface covers dependency declaration parsing across all three Carthage origin types (github, git, binary) and pinned dependency state from the resolved lockfile.
Python Status
- Python ScanCode does not currently ship a Carthage packagedcode parser.
- Upstream issue
aboutcode-org/scancode-toolkit#2656remains open with no implementation. - This gives Rust direct packagedcode support for Carthage dependency metadata that the Python reference does not currently provide.
Rust Improvements
Cartfile and Cartfile.private dependency extraction
- Rust now recognizes
CartfileandCartfile.privateand extracts direct dependency declarations. Cartfile.privateis markedis_private: trueso the project-local manifest stays distinguishable from the ordinaryCartfilesurface.- All three Carthage origin types are supported:
githubentries producepkg:github/purls, whilegitandbinaryentries preserve source identity in dependency metadata. - Version requirement operators (
>=,~>,==) and branch/tag references are preserved asextracted_requirement. - Inline comments are stripped from version specifications.
Pinned dependency state from Cartfile.resolved
- Rust now parses
Cartfile.resolvedfor locked dependency versions. - Resolved versions are included in
pkg:github/purls and dependencies are markedis_pinned: true. - Scanner assembly hoists the PURL-bearing declared dependency view from
Cartfileand the pinned dependency view fromCartfile.resolvedwithout inventing a root Carthage package identity.
Guardrails
- Rust does not resolve or fetch dependencies, evaluate Xcode build settings, or inspect built framework artifacts.
gitandbinaryorigin types do not produce purls because there is no standard purl type for arbitrary git URLs or binary distribution specs.