Skip to content

feat: add CocoaPods Podfile ecosystem checker - #24

Draft
algomaster99 wants to merge 1 commit into
mainfrom
claude/add-cocoapods-ecosystem
Draft

feat: add CocoaPods Podfile ecosystem checker#24
algomaster99 wants to merge 1 commit into
mainfrom
claude/add-cocoapods-ecosystem

Conversation

@algomaster99

Copy link
Copy Markdown
Member

Summary

  • Adds pkg/cocoapods, checking pod pins in Podfile against CocoaPods' trunk registry, via git-pkgs/manifests + an injected resolver.Resolver.
  • Prioritized (see Add more ecosystems (Cargo, RubyGems, Composer, NuGet, CocoaPods, Bazel, Go, GitHub Actions) #4) because there's no CocoaPods equivalent of cargo add/go get/npm install: pod install/pod update only resolve versions for pods already listed in the Podfile — neither one adds a new pod line, so adding a dependency means hand-typing pod "Name", "x.y.z".
  • CocoaPods reuses RubyGems' requirement operators; a bare version is an exact pin (requireOperator=false), but git-pkgs/vers has no dedicated "cocoapods" scheme, and its generic constraint parser doesn't recognize the ~> pessimistic operator as an operator at all — it would otherwise misparse "~> 1.0" as a literal exact version. isPessimisticConstraint filters that out before it reaches pins.ExactVersion.
  • Wired into newCheckers/checkerFor in main.go, covered by unit tests, and added to benchmark/cases.json (4 fresh + 1 existing).

Before: no Podfile support — a stale pod version pin passes through unchecked.

After:

outdated dependencies, use these versions instead:
  Alamofire  5.4.0 -> 5.9.1

Generated by Claude Code

Adds pkg/cocoapods, checking pod pins in Podfile against CocoaPods'
trunk registry. Prioritized (see #4) because there's no
CocoaPods equivalent of `cargo add`/`go get`/`npm install`: `pod
install`/`pod update` only resolve versions for pods already listed in
the Podfile, neither one adds a new `pod` line, so adding a dependency
means hand-typing `pod "Name", "x.y.z"`.

CocoaPods reuses RubyGems' requirement operators; a bare version is an
exact pin (requireOperator=false), but git-pkgs/vers has no dedicated
"cocoapods" scheme, and its generic constraint parser doesn't recognize
the `~>` pessimistic operator as an operator at all - it would otherwise
misparse "~> 1.0" as a literal exact version. isPessimisticConstraint
filters that out before it reaches pins.ExactVersion.

Wired into newCheckers/checkerFor in main.go, covered by unit tests, and
added to benchmark/cases.json (4 fresh + 1 existing).
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.

2 participants