swift icon indicating copy to clipboard operation
swift copied to clipboard

"danger-swift edit" no longer works with Swift 5.8 due to the removal of generate-xcodeproj

Open jagdeep-manik opened this issue 1 year ago • 5 comments

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/<username>/.danger-swift/Scripts/Cache/-Users-<username>-Documents-<project>-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 <options> <subcommand>\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.

jagdeep-manik avatar Apr 05 '23 21:04 jagdeep-manik

See: https://github.com/danger/swift/pull/566 for WIP on fixing this

orta avatar Apr 05 '23 21:04 orta

@orta any chance to have a new release soon? can't start testing danger-swift because latest release (3.16.0) does not contain the fix. 🙏

pjechris avatar Jun 29 '23 12:06 pjechris

/cc @f-meloni

orta avatar Jun 29 '23 14:06 orta

I have just released 3.17.0, let me know if it works as expected :)

f-meloni avatar Jul 01 '23 18:07 f-meloni

@f-meloni it's working, thanks a lot 🙏

pjechris avatar Jul 05 '23 11:07 pjechris