Open AndrewVebster opened 1 month ago
I could reproduce the problem with Xcode 16 beta 6 (16A5230g). Do we have any updates about this issue or a possible workaround? Thank you!
I just ran into this issue with Xcode 16.0 RC 1 (16A242). Is there any update on this?
Same here with RC
let danger = Danger()
| `- error: cannot call value of non-function type 'module<Danger>'
Is it possible that it thinks you are referring to the Danger module and not the Danger function?
Would Danger.Danger()
work?
Unfortunately, this doesn’t solve the issue:
$ swift run danger-swift pr https://github.com/…
Building for debugging...
[1/1] Write swift-version--6E9C300FE98E0E3E.txt
Build of product 'danger-swift' complete! (0.34s)
Starting Danger PR on …
/var/folders/vk/v4gx2v6x4972w9v5r1xggx000000gn/T/_tmp_dangerfile.swift:13:14: error: module 'Danger' has no member named 'Danger'
11 | import Danger
12 |
13 | let danger = Danger.Danger()
| `- error: module 'Danger' has no member named 'Danger'
14 | let pullRequest = danger.github.pullRequest
15 | let git = danger.git
Hi 👋
When running danger-swift on a device with Xcode 16 the command fails with this error:
Running locally and on Bitrise - the error is the same. Using this command:
swift run danger-swift local --cwd ../../
or this on CIswift run danger-swift ci --no-publish-check -f --cwd ../../
I believe my setup is pretty standard:
let danger = Danger()
19 | fail(message: "Message", file: $0, line: 2) | `- error: cannot find 'fail' in scope
swift run danger-swift local --cwd ../../ Building for debugging... [1/1] Write swift-version-39B54973F684ADAB.txt Build of product 'danger-swift' complete! (0.34s) (node:51429) [DEP0040] DeprecationWarning: The'
5 | import Foundation
6 |
7 | let danger = Danger()
| `- error: cannot call value of non-function type 'module'
8 |
9 |
punycode
module is deprecated. Please use a userland alternative instead. (Usenode --trace-deprecation ...
to show where the warning was created) /var/folders/gj/tj6dnp8d1s71sp3sj5tlkh000000gn/T/danger/B52A4EC1-CE42-45E0-955E-3E50FB477100/_tmp_dangerfile.swift:7:14: error: cannot call value of non-function type 'moduleERROR: Dangerfile eval failed at Dangerfile.swift ERROR: Could not get the results JSON file at /var/folders/gj/tj6dnp8d1s71sp3sj5tlkh000000gn/T/danger/B52A4EC1-CE42-45E0-955E-3E50FB477100/danger-response.json
Danger: ⅹ Failing the build, there is 1 fail.
Failures
danger-swift
failed.Markdowns
Log
/var/folders/gj/tj6dnp8d1s71sp3sj5tlkh000000gn/T/danger/B52A4EC1-CE42-45E0-955E-3E50FB477100/_tmp_dangerfile.swift:7:14: error: cannot call value of non-function type 'module'
5 | import Foundation
6 |
7 | let danger = Danger()
| `- error: cannot call value of non-function type 'module'
8 |
9 |
ERROR: Dangerfile eval failed at Dangerfile.swift
ERROR: Could not get the results JSON file at /var/folders/gj/tj6dnp8d1s71sp3sj5tlkh000000gn/T/danger/B52A4EC1-CE42-45E0-955E-3E50FB477100/danger-response.json
// swift-tools-version: 5.9 // The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package( name: "DangerDependencies", products: [ .library( name: "DangerDeps", type: .dynamic, targets: ["DangerDependencies"]), ], dependencies: [ .package(url: "https://github.com/danger/swift.git", from: "3.18.1"), ], targets: [ .target( name: "DangerDependencies", dependencies: [ .product(name: "Danger", package: "swift") ] ), ] )
import Danger import Foundation
let danger = Danger()