Open mohamedTarek95 opened 3 years ago
do you get that also if you remove completely the folder ~/.danger-swift
?
do you get that also if you remove completely the folder
~/.danger-swift
?
Yes
Same issue here.
Can I ask you if you can share which version of swift/xcode you are using and your Dangerfile.swift please?
I'm seeing the same error on Circle CI (example failure). I did some digging and thought I'd share – I have a local workaround but I'm not sure about how to turn this into a fix.
I've reproduced the error locally using danger-swift
3.12.1 and Xcode 13, though CI is using Xcode 12.5.1. The Dangerfile is here. These two lines are causing the issue:
import DangerSwiftProse // package: https://github.com/f-meloni/danger-swift-prose.git
import DangerXCodeSummary // package: https://github.com/f-meloni/danger-swift-xcodesummary.git
Looks like the error is generated here:
I ran swift package update
in ~/.danger-swift/Packages/Generated
to reproduce the underlying error and got the following:
'PACKAGES' /Users/ash/.danger-swift/Packages/Generated: error: Source files for target PACKAGES should be located under 'Sources/PACKAGES', or a custom sources path can be set with the 'path' property in Package.swift
Based on the error output, I created a directory with an empty Swift source file in it:
mkdir -p ~/.danger-swift/Packages/Generated/Sources/PACKAGES
touch /Users/ash/.danger-swift/Packages/Generated/Sources/PACKAGES/Empty.swift
Then swift package update
worked in the generated folder. I was able to run danger-swift local
back in my directory without an issue.
I'm not sure the best approach to take here. We could either modifying the generated Package.swift
to allow empty targets (if that's supported by SPM) or we could generate an empty .swift
source file like I did above. If you point me in the right direction, I'm happy to try sending a pull request.
Thanks again!
When I try to install plugins using Marathon inline dependencies I get this error on Bitrise
I tried using sudo to run the danger command and tried without sudo and it fails in both cases.