dependabot / dependabot/dependabot-core
Support projects with a `Package.resolved` file but using `.xcodeproj` bundles as manifests
- Dominant language
- Ruby
- Stars
- 5.8k
- Forks
- 1.5k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 149
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Feature description
In the Swift world, some projects use a `Package.resolved` lockfile, but no `Package.swift` manifest.
As specified at https://github.com/dependabot/dependabot-core/issues/1245#issuecomment-1631572077:
> Swift Apps (iOS, macOS)
> * Have a `*.xcodeproj/project.pbxproj` file defining dependency version rules (among other project stuff)
> * Have a `*.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved` file with the "pins" for specific package versions actually used
> Interactions are mostly through Xcode manually editing version rules and clicking at Update to Latest Package Versions
Also suggested below:
> I think you can automate this part as well by using the `xcodebuild -resolvePackageDependencies` command with some further options.
Last suggestion sounds promising but my understanding is that it would require using a MacOS native tool, which seems problematic since our updater images are linux-based.
Another idea would be to create a temporary `Package.swift` file that adds all `Package.resolved` dependencies as direct dependencies, and then use SwiftPM to manage the updates like we do now. I think that would work, but may break those "dependency version rules" defined at `*.xcodeproj/project.pbxproj`.
So, I think first of all we'd need a specification for these dependency version rules.
Contributor guide
Research direction
Start by comparing the Package.resolved lockfile with dependency version rules in *.xcodeproj/project.pbxproj, then review the suggested xcodebuild -resolvePackageDependencies approach and the temporary Package.swift alternative. Define how dependency rules should be specified and what successful support for Xcode project bundles would look like.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100