Skip to content

Detect CocoaPods and Carthage dependency files - #41

Merged
sabbaticas merged 2 commits into
mainfrom
feat/cocoapods-carthage-detection
Oct 10, 2026
Merged

sabbaticas merged 2 commits into
mainfrom
feat/cocoapods-carthage-detection

Conversation

@sabbaticas

@sabbaticas sabbaticas commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #42.

Summary

  • Podfile and Podfile.lock are tagged dependencies and CocoaPods.
  • Cartfile, Cartfile.private and Cartfile.resolved are tagged dependencies and Carthage.
  • Podfile reports as Ruby and the three Carthage files as a new Cartfile filetype, instead of Unknown.

An iOS or macOS project using either tool previously looked like it declared no dependencies. This completes the Apple-platform dependency managers begun with Swift Package Manager in #38.

Before and after

Podfile             []                              'Unknown'
Podfile.lock        []                              'Lock'
Cartfile            []                              'Unknown'
Cartfile.private    []                              'Unknown'
Cartfile.resolved   []                              'Unknown'
Podfile             ['dependencies', 'CocoaPods']   'Ruby'
Podfile.lock        ['dependencies', 'CocoaPods']   'Lock'
Cartfile            ['dependencies', 'Carthage']    'Cartfile'
Cartfile.private    ['dependencies', 'Carthage']    'Cartfile'
Cartfile.resolved   ['dependencies', 'Carthage']    'Cartfile'

Sources

Convention Source
The file is named Podfile The Podfile
Podfile.lock records installed versions and is kept in version control Using CocoaPods
An extensionless Podfile is loaded as Ruby podfile.rb in CocoaPods/Core
Cartfile, Cartfile.private, Cartfile.resolved and the OGDL-subset syntax Carthage Artifacts

Design notes

  • No language tag. Both tools serve Swift and Objective-C projects alike.
  • No build tag. These files declare and pin dependencies, like package.json and uv.lock.
  • Podfile is Ruby. The CocoaPods guides do not name the language, but the loader evaluates an extensionless Podfile as Ruby. Same basis as the existing Steepfile mapping. A Podfile now counts towards a repository's Ruby total.
  • Cartfile is a new filetype. Carthage documents its syntax as a restricted subset of OGDL. The docs do not name a syntax for Cartfile.resolved; it takes the filetype of the file it is generated from.
  • Cartfile.private and Cartfile.resolved are mapped by basename, so .private and .resolved are not claimed in general. Tests guard this.

Things to note

  • CocoaPods and Carthage are new tags and Cartfile a new filetype. All additive, so kospex is unaffected until a re-sync.
  • Vocabulary is now 123 tags and 88 filetypes; the docs site counts are updated to match.
  • The changes notes also record background research: what Carthage supports, the fact that Apple does not document it, and where the SwiftPM name comes from.
  • The version stays at 0.0.21, which is unreleased.

Not included

  • *.podspec files, and the Pods/ and Carthage/ directories.
  • CocoaPods' alternative Podfile names (CocoaPods.podfile, CocoaPods.podfile.yaml, Podfile.rb), which the source accepts but the guides do not document.

Testing

  • pytest: 742 passed. The new tests were written first and failed before the change; guards cover look-alike filenames.
  • Fixtures added in src/tests/ for all five files; panopticas assess shows each with the expected filetype and tags.

🤖 Generated with Claude Code

sabbaticas and others added 2 commits October 10, 2026 16:10
Podfile and Podfile.lock are tagged dependencies and CocoaPods. Cartfile,
Cartfile.private and Cartfile.resolved are tagged dependencies and
Carthage. An iOS or macOS project using either tool previously looked
like it declared no dependencies.

Podfile now reports as Ruby, which is how CocoaPods loads it. The three
Carthage files report as a new Cartfile filetype; the two with an
extension are mapped by basename so that .private and .resolved are not
claimed in general.

Neither tool's files carry a language tag, since both serve Swift and
Objective-C alike.

The changes notes record the sources each convention was verified
against, and the docs site counts are updated to 123 tags and 88
filetypes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sabbaticas
sabbaticas merged commit 4f54b79 into main Oct 10, 2026
5 checks passed
@sabbaticas
sabbaticas deleted the feat/cocoapods-carthage-detection branch October 10, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect CocoaPods and Carthage dependency files

1 participant