"danger-swift edit" no longer works with Swift 5.8 due to the removal of generate-xcodeproj
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 152
- Avg merge
- 9h 54m
- Merged PRs (30d)
- 2
Description
**Reproduction Steps:**
- Download Xcode 14.3 and make sure your command line tools use Xcode 14.3 (Xcode > Settings > Command Line Tools, or use `xcode-select -s`)
- Navigate to a project with a Dangerfile
- In terminal, enter `danger-swift edit`
You'll receive an error along the lines of:
``` ERROR: commandFailed(command: "cd /Users//.danger-swift/Scripts/Cache/-Users--Documents--Dangerfile && /usr/bin/env xcrun --sdk macosx swift package generate-xcodeproj --xcconfig-overrides /var/folders/31/jcw4hfyd6dv_x87s3z8kd9m40000gp/T/config.xcconfig", exitCode: 64, stdout: "", stderr: "error: Unknown subcommand or plugin name \'generate-xcodeproj\'\nUsage: swift package \n See \'package -help\' for more information.\n") ```
I couldn't find too much information on the command being removed, apart from this comment:
https://github.com/apple/swift-package-manager/issues/6640
But if you use swift 5.7.1 tools and run `swift help package generate-xcodeproj` you'll receive a message saying `OVERVIEW: Generates an Xcode project. This command will be deprecated soon.`, whereas if you use swift 5.8 tools and run `swift help package generate-xcodeproj` it'll just list the normal "help" message and generate-xcodeproj is no longer listed. So it seems like it was indeed removed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the implementation of the `danger-swift edit` command and reproduce the failure with Xcode 14.3 or Swift 5.8, comparing it with Swift 5.7.1 where `generate-xcodeproj` still exists. Trace how the command invokes `swift package generate-xcodeproj`; done means `danger-swift edit` completes successfully with Swift 5.8 tools.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100