feat: add CocoaPods Podfile ecosystem checker - #24
Draft
algomaster99 wants to merge 1 commit into
Draft
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pkg/cocoapods, checking pod pins inPodfileagainst CocoaPods' trunk registry, viagit-pkgs/manifests+ an injectedresolver.Resolver.cargo add/go get/npm install:pod install/pod updateonly resolve versions for pods already listed in the Podfile — neither one adds a newpodline, so adding a dependency means hand-typingpod "Name", "x.y.z".requireOperator=false), butgit-pkgs/vershas 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.isPessimisticConstraintfilters that out before it reachespins.ExactVersion.newCheckers/checkerForinmain.go, covered by unit tests, and added tobenchmark/cases.json(4 fresh + 1 existing).Before: no
Podfilesupport — a stalepodversion pin passes through unchecked.After:
Generated by Claude Code