-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Danger 3.19.1 is not working on Xcode 16. #623
Comments
Any updates on this? |
We're also facing the same issue 😢 |
We are experiencing the same issue running Danger-Swift on Ubuntu, so Xcode is not involved. Could it be a Swift 6 issue? |
Same experience on Github Actions |
I don't see how. The |
The |
Also happening on 3.20.0:
|
the homebrew version is not working, SwiftPM version is not working either. |
SwiftPM is working on 3.20.0 (#615) while brew should now be working on 3.20.1, please let me know if it works |
nope. Tried SwiftPM today, still no luck when trying to use SwiftLint launch logswift run danger-swift ci
[0/1] Planning build
Building for debugging...
[0/14] Write sources
[9/14] Write danger-swift-entitlement.plist
[10/14] Write swift-version--58304C5D6DBC2206.txt
[12/24] Emitting module Require
[13/24] Compiling Require Require.swift
[14/24] Emitting module DangerShellExecutor
[15/24] Compiling DangerShellExecutor ShellExecutor.swift
[16/24] Compiling Logger Logger.swift
[17/24] Emitting module Logger
[18/24] Emitting module ShellOut
[19/24] Compiling ShellOut ShellOut.swift
[20/38] Emitting module Files
[21/38] Compiling Files Files.swift
[22/43] Emitting module RunnerLib
[23/43] Emitting module Releases
[24/44] Compiling RunnerLib HelpMessagePresenter.swift
[25/44] Compiling RunnerLib NSRegularExpression+FilesImport.swift
[26/44] Compiling RunnerLib Runtime.swift
[27/44] Compiling RunnerLib ImportsFinder.swift
[28/44] Compiling RunnerLib GetDangerJSPath.swift
[29/44] Compiling RunnerLib DangerfileArgumentsPath.swift
[30/44] Compiling RunnerLib DangerSwiftOption.swift
[31/44] Compiling RunnerLib CliArgs.swift
[32/44] Compiling RunnerLib CliArgsParser.swift
[33/44] Compiling RunnerLib CreateConfig.swift
[34/44] Compiling RunnerLib DangerCommand.swift
[35/44] Compiling RunnerLib DangerFileGenerator.swift
[36/44] Compiling RunnerLib DangerJSVersionFinder.swift
[37/44] Compiling Releases ReleasesError.swift
[38/44] Compiling Releases Array+Version.swift
[39/44] Compiling Releases Releases.swift
[40/44] Compiling Releases Version.swift
[41/44] Compiling RunnerLib SPMDanger.swift
[42/72] Compiling MarathonCore PrintableError.swift
[43/72] Compiling MarathonCore Printer.swift
[44/72] Compiling MarathonCore Task.swift
[45/72] Compiling MarathonCore URL+Marathon.swift
[46/72] Compiling MarathonCore Help.swift
[47/72] Compiling MarathonCore Install.swift
[48/72] Compiling MarathonCore List.swift
[49/72] Compiling MarathonCore Marathon.swift
[50/72] Compiling MarathonCore MarathonFile.swift
[51/72] Compiling MarathonCore Package.swift
[52/72] Compiling MarathonCore Script.swift
[53/72] Compiling MarathonCore ScriptManager.swift
[54/72] Compiling MarathonCore PackageManager.swift
[55/72] Compiling MarathonCore Perform.swift
[56/72] Compiling MarathonCore ShellOut+Marathon.swift
[57/72] Compiling MarathonCore String+Marathon.swift
[58/72] Compiling MarathonCore Command.swift
[59/72] Compiling MarathonCore Create.swift
[60/72] Compiling MarathonCore Edit.swift
[61/72] Compiling MarathonCore Remove.swift
[62/72] Compiling MarathonCore Run.swift
[63/72] Compiling MarathonCore Executable.swift
[64/72] Compiling MarathonCore FishAutocompleteInstaller.swift
[65/72] Compiling MarathonCore Folder+Marathon.swift
[66/72] Emitting module MarathonCore
[67/72] Compiling MarathonCore Add.swift
[68/72] Compiling MarathonCore Array+Marathon.swift
[69/72] Compiling MarathonCore Codable+TypeInference.swift
[70/74] Compiling MarathonCore Update.swift
[71/74] Compiling MarathonCore ZshAutocompleteInstaller.swift
[72/81] Compiling Runner MarathonScriptManager.swift
[73/81] Compiling Runner RunDangerJS.swift
[74/81] Compiling Runner Script+Imports.swift
[75/81] Compiling Runner main.swift
[76/81] Compiling Runner Edit.swift
[77/81] Emitting module Runner
[78/81] Compiling Runner Runner.swift
[78/81] Write Objects.LinkFileList
[79/81] Linking danger-swift
[80/81] Applying danger-swift
Build of product 'danger-swift' complete! (9.83s)
(node:19056) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/pr/.build/debug/SwiftBasicFormat-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftBasicFormat'
1 | module SwiftBasicFormat {
| `- error: redefinition of module 'SwiftBasicFormat'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftBasicFormat-tool.build/SwiftBasicFormat-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftBasicFormat.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftBasicFormat {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftBasicFormat.build/SwiftBasicFormat-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftParser.build/module.modulemap:1:8: error: redefinition of module 'SwiftParser'
1 | module SwiftParser {
| `- error: redefinition of module 'SwiftParser'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftParser.build/SwiftParser-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftParser-tool.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftParser {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftParser-tool.build/SwiftParser-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftCompilerPluginMessageHandling.build/module.modulemap:1:8: error: redefinition of module 'SwiftCompilerPluginMessageHandling'
1 | module SwiftCompilerPluginMessageHandling {
| `- error: redefinition of module 'SwiftCompilerPluginMessageHandling'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftCompilerPluginMessageHandling.build/SwiftCompilerPluginMessageHandling-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftCompilerPluginMessageHandling-tool.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftCompilerPluginMessageHandling {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftCompilerPluginMessageHandling-tool.build/SwiftCompilerPluginMessageHandling-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntaxMacros-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftSyntaxMacros'
1 | module SwiftSyntaxMacros {
| `- error: redefinition of module 'SwiftSyntaxMacros'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntaxMacros-tool.build/SwiftSyntaxMacros-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntaxMacros.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftSyntaxMacros {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntaxMacros.build/SwiftSyntaxMacros-Swift.h"
3 | requires objc
/pr/.build/debug/ArgumentParserToolInfo.build/module.modulemap:1:8: error: redefinition of module 'ArgumentParserToolInfo'
1 | module ArgumentParserToolInfo {
| `- error: redefinition of module 'ArgumentParserToolInfo'
2 | header "/pr/.build/x86_64-apple-macosx/debug/ArgumentParserToolInfo.build/ArgumentParserToolInfo-Swift.h"
3 | requires objc
/pr/.build/debug/ArgumentParserToolInfo-tool.build/module.modulemap:1:8: note: previously defined here
1 | module ArgumentParserToolInfo {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/ArgumentParserToolInfo-tool.build/ArgumentParserToolInfo-Swift.h"
3 | requires objc
/pr/.build/debug/ArgumentParser.build/module.modulemap:1:8: error: redefinition of module 'ArgumentParser'
1 | module ArgumentParser {
| `- error: redefinition of module 'ArgumentParser'
2 | header "/pr/.build/x86_64-apple-macosx/debug/ArgumentParser.build/ArgumentParser-Swift.h"
3 | requires objc
/pr/.build/debug/ArgumentParser-tool.build/module.modulemap:1:8: note: previously defined here
1 | module ArgumentParser {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/ArgumentParser-tool.build/ArgumentParser-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax509-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftSyntax509'
1 | module SwiftSyntax509 {
| `- error: redefinition of module 'SwiftSyntax509'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax509-tool.build/SwiftSyntax509-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax509.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftSyntax509 {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax509.build/SwiftSyntax509-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftParserDiagnostics.build/module.modulemap:1:8: error: redefinition of module 'SwiftParserDiagnostics'
1 | module SwiftParserDiagnostics {
| `- error: redefinition of module 'SwiftParserDiagnostics'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftParserDiagnostics.build/SwiftParserDiagnostics-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftParserDiagnostics-tool.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftParserDiagnostics {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftParserDiagnostics-tool.build/SwiftParserDiagnostics-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax510-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftSyntax510'
1 | module SwiftSyntax510 {
| `- error: redefinition of module 'SwiftSyntax510'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax510-tool.build/SwiftSyntax510-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax510.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftSyntax510 {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax510.build/SwiftSyntax510-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftOperators-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftOperators'
1 | module SwiftOperators {
| `- error: redefinition of module 'SwiftOperators'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftOperators-tool.build/SwiftOperators-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftOperators.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftOperators {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftOperators.build/SwiftOperators-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftSyntax'
1 | module SwiftSyntax {
| `- error: redefinition of module 'SwiftSyntax'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax-tool.build/SwiftSyntax-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftSyntax {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax.build/SwiftSyntax-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntaxBuilder-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftSyntaxBuilder'
1 | module SwiftSyntaxBuilder {
| `- error: redefinition of module 'SwiftSyntaxBuilder'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntaxBuilder-tool.build/SwiftSyntaxBuilder-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntaxBuilder.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftSyntaxBuilder {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntaxBuilder.build/SwiftSyntaxBuilder-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax600-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftSyntax600'
1 | module SwiftSyntax600 {
| `- error: redefinition of module 'SwiftSyntax600'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax600-tool.build/SwiftSyntax600-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntax600.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftSyntax600 {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntax600.build/SwiftSyntax600-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftCompilerPlugin-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftCompilerPlugin'
1 | module SwiftCompilerPlugin {
| `- error: redefinition of module 'SwiftCompilerPlugin'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftCompilerPlugin-tool.build/SwiftCompilerPlugin-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftCompilerPlugin.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftCompilerPlugin {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftCompilerPlugin.build/SwiftCompilerPlugin-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftDiagnostics.build/module.modulemap:1:8: error: redefinition of module 'SwiftDiagnostics'
1 | module SwiftDiagnostics {
| `- error: redefinition of module 'SwiftDiagnostics'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftDiagnostics.build/SwiftDiagnostics-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftDiagnostics-tool.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftDiagnostics {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftDiagnostics-tool.build/SwiftDiagnostics-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntaxMacroExpansion-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftSyntaxMacroExpansion'
1 | module SwiftSyntaxMacroExpansion {
| `- error: redefinition of module 'SwiftSyntaxMacroExpansion'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntaxMacroExpansion-tool.build/SwiftSyntaxMacroExpansion-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftSyntaxMacroExpansion.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftSyntaxMacroExpansion {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftSyntaxMacroExpansion.build/SwiftSyntaxMacroExpansion-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftFormat-tool.build/module.modulemap:1:8: error: redefinition of module 'SwiftFormat'
1 | module SwiftFormat {
| `- error: redefinition of module 'SwiftFormat'
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftFormat-tool.build/SwiftFormat-Swift.h"
3 | requires objc
/pr/.build/debug/SwiftFormat.build/module.modulemap:1:8: note: previously defined here
1 | module SwiftFormat {
| `- note: previously defined here
2 | header "/pr/.build/x86_64-apple-macosx/debug/SwiftFormat.build/SwiftFormat-Swift.h"
3 | requires objc
/pr/.build/debug/Danger.build/module.modulemap:2:12: error: header '/pr/.build/x86_64-apple-macosx/debug/Danger.build/Danger-Swift.h' not found
1 | module Danger {
2 | header "/pr/.build/x86_64-apple-macosx/debug/Danger.build/Danger-Swift.h"
| `- error: header '/pr/.build/x86_64-apple-macosx/debug/Danger.build/Danger-Swift.h' not found
3 | requires objc
4 | }
/var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/_tmp_dangerfile.swift:4:8: error: could not build Objective-C module 'Danger'
2 |
3 | import Foundation
4 | import Danger
| `- error: could not build Objective-C module 'Danger'
5 | import DangerShellExecutor
6 |
ERROR: Dangerfile eval failed at Dangerfile.swift DangerFileimport Foundation
import Danger
import DangerShellExecutor
let path = ShellExecutor().execute("pwd", arguments: [], environmentVariables: [:], outputFile: nil)
SwiftLint.lint(.all(directory: path + "/Project/Path"), inline: true, swiftlintPath: .bin(path + "/Project/Pods/SwiftLint/swiftlint"))
let misplacedLines = ShellExecutor().execute("grep --include=\\*.{storyboard,xib} -rnw . -e \"misplaced=\\\"YES\\\"\"", arguments: [], environmentVariables: [:], outputFile: nil).split(separator: "\n").map { String($0) }
let regEx = try? NSRegularExpression(pattern: "([^\\:]*)\\:(\\d+)\\:.*", options: [.anchorsMatchLines, .dotMatchesLineSeparators])
for misplacedLine in misplacedLines {
let range = NSRange(misplacedLine.startIndex..., in: misplacedLine)
guard let checkingResult = regEx?.firstMatch(in: misplacedLine, options: [], range: range) else { continue }
let rngFile: NSRange = checkingResult.range(at: 1)
let rngPos: NSRange = checkingResult.range(at: 2)
guard let subRangeFile = Range(rngFile, in: misplacedLine), let subRangePos = Range(rngPos, in: misplacedLine), let pos = Int(String(misplacedLine[subRangePos])) else { continue }
let file = String(misplacedLine[subRangeFile])
warn(message: "storyboard ambiguity", file: file, line: pos) Package.swift// swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "Eigen",
products: [
.library(name: "DangerDepsLinter", type: .dynamic, targets: ["DangerDependencies"]), // dev
],
dependencies: [
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.54.0"),
.package(url: "https://github.com/danger/swift.git", from: "1.0.0"),
.package(url: "https://github.com/Realm/SwiftLint", from: "0.56.0")
],
targets: [
.target(name: "DangerDependencies")
]
) |
Can you please post the verbose logs obtained by adding |
Sure! Will provide you verbose logs a bit later |
@Sega-Zero looking at your Package.swift it seems you have
I think this would not get the latest version 3.20.1. |
Still not working with
|
@oronbz would you have time to manually install danger swift (clone the repo, run make install)? |
Trying... |
Same issue @f-meloni:
|
@oronbz I'm not able to reproduce it on Mac, are you on Linux? |
It's a Bitrise (CI) mac edit: It comes preinstalled with |
I would probably run
(assuming danger is saved there) |
@f-meloni first of all, it doesn't work locally for me
This is from a |
@f-meloni exactly the same with local clone and import Danger
import Foundation
let danger = Danger()
// Make sure no Quick focused tests were accidentally left in
verifyNoQuickFocusedTests()
// When run locally or out of a PR scenario, `github` will be nil
if let pullRequest = danger.github?.pullRequest {
if pullRequest.title.starts(with: "[WIP]") {
warn("PR is classified as Work in Progress")
}
detectJIRATicket(in: pullRequest.title)
}
// Warn if GTRide.h has been changed
if danger.git.modifiedFiles.contains("Gett/Model/GTRide.h") {
warn("`GTRide.h` has been modified. " +
"If you've added a property, make sure you've also added it in: " +
"`GTWorkflow.m` `updateRide:(GTRide*)ride`")
}
// Lint Rider
let riderViloations = SwiftLint.lint(.all(directory: "Rider"), inline: true, configFile: "Rider/.swiftlint.yml")
// Lint project
let gtViloations = SwiftLint.lint(.all(directory: nil), inline: true)
let violationCount = riderViloations.count + gtViloations.count
if violationCount > 0 {
fail("There are \(violationCount) violations, please fix those before merging")
}
// MARK: - Private Helpers
/// Check if a JIRA ticket is mentioned in the PR title
private func detectJIRATicket(in title: String) {
guard title.starts(with: "[GETT-"),
let jiraTicket = title.components(separatedBy: "]").first?.dropFirst() else {
return
}
message("JIRA Ticket: [\(jiraTicket)](https://jira.gtforge.com/browse/\(jiraTicket))")
}
/// Make sure we didn't forget any focused Quick tests on
private func verifyNoQuickFocusedTests() {
func testFiles(containing searchTerm: String) -> [String] {
let result = danger.utils.exec("grep -rlI \"\(searchTerm)\" GettTests/")
return result
.components(separatedBy: "\n")
.compactMap { piece -> String? in
guard let spec = piece.components(separatedBy: "/")
.last?
.trimmingCharacters(in: .whitespacesAndNewlines),
!spec.isEmpty else { return nil }
return spec
}
}
let fitFiles = testFiles(containing: "fit(")
let fdescribeFiles = testFiles(containing: "fdescribe(")
let fcontextFiles = testFiles(containing: "fcontext(")
if !fitFiles.isEmpty {
fail("The following specs have fit() focused tests: \(fitFiles.joined(separator: ", "))")
}
if !fdescribeFiles.isEmpty {
fail("The following specs have fdescribe() focused tests: \(fdescribeFiles.joined(separator: ", "))")
}
if !fcontextFiles.isEmpty {
fail("The following specs have fcontext() focused tests: \(fcontextFiles.joined(separator: ", "))")
}
} |
So, this is what confuses me at the moment: This is doing a |
@oronbz can you try to run make install from this branch please? |
@f-meloni worked! Woop woop
|
Great! let me clean up, merge and release! |
Can you please try the new version 3.20.2? |
Thank you so much @f-meloni! |
Fantastic! Closing the issue then :) |
@f-meloni sorry 😭 swift run danger-swift ci --verbose
[0/1] Planning build
Building for debugging...
[0/11] Write sources
[6/11] Write danger-swift-entitlement.plist
[7/11] Write swift-version--58304C5D6DBC2206.txt
[9/21] Compiling Version Version+Comparable.swift
[10/21] Compiling Version Version.swift
[11/21] Compiling Version Version+Codable.swift
[12/21] Compiling Version Version+Range.swift
[13/21] Emitting module Version
[14/21] Compiling Version Version+Foundation.swift
[15/21] Compiling DangerShellExecutor ShellExecutor.swift
[16/21] Emitting module DangerShellExecutor
[17/21] Emitting module Logger
[18/21] Compiling Logger Logger.swift
[19/48] Emitting module RunnerLib
[20/48] Compiling RunnerLib DangerFileGenerator.swift
[21/49] Compiling RunnerLib ImportsFinder.swift
[22/49] Compiling RunnerLib NSRegularExpression+FilesImport.swift
[23/49] Compiling RunnerLib Runtime.swift
[24/49] Compiling RunnerLib String+Path.swift
[25/49] Compiling RunnerLib HelpMessagePresenter.swift
[26/49] Compiling RunnerLib DangerCommand.swift
[27/49] Compiling RunnerLib DangerJSVersionFinder.swift
[28/49] Compiling RunnerLib GetDangerJSPath.swift
[29/49] Compiling RunnerLib DangerSwiftOption.swift
[30/49] Compiling RunnerLib DangerfileArgumentsPath.swift
[31/49] Compiling RunnerLib CliArgs.swift
[32/49] Compiling RunnerLib CliArgsParser.swift
[33/49] Compiling RunnerLib SPMDanger.swift
[34/49] Compiling DangerDependenciesResolver URL+RemoteRepository.swift
[35/49] Compiling DangerDependenciesResolver PackageGenerator.swift
[36/49] Compiling DangerDependenciesResolver PackageDataProvider.swift
[37/49] Compiling DangerDependenciesResolver PackageListMaker.swift
[38/49] Compiling DangerDependenciesResolver PackageManager.swift
[39/49] Compiling DangerDependenciesResolver Data+Encoding.swift
[40/49] Compiling DangerDependenciesResolver FileReader.swift
[41/49] Compiling DangerDependenciesResolver Script.swift
[42/49] Compiling DangerDependenciesResolver FileCreator.swift
[43/49] Compiling DangerDependenciesResolver Package.swift
[44/49] Emitting module DangerDependenciesResolver
[45/49] Compiling DangerDependenciesResolver InlineDependenciesFinder.swift
[46/49] Compiling RunnerLib VersionChecker.swift
[47/55] Compiling Runner RunDangerJS.swift
[48/55] Compiling Runner Runner.swift
[49/55] Compiling Runner MarathonScriptManager.swift
[50/55] Compiling Runner Edit.swift
[51/55] Compiling Runner main.swift
[52/55] Emitting module Runner
[52/55] Write Objects.LinkFileList
[53/55] Linking danger-swift
[54/55] Applying danger-swift
Build of product 'danger-swift' complete! (8.20s)
(node:76886) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
/var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/danger/5196ACCE-432E-4569-8C47-B23A61C80303/_tmp_dangerfile.swift:4:8: error: no such module 'Danger'
2 |
3 | import Foundation
4 | import Danger
| `- error: no such module 'Danger'
5 | import DangerShellExecutor
6 |
Launching Danger Swift runner (v3.20.2)
Got URL for JSON: /var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/danger-dsl-391a3e8c.json
Created a temporary file for the Dangerfile DSL at: /var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/danger-dsl-391a3e8c.json
Running Dangerfile at: Dangerfile.swift
Preparing to compile
Running: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift --driver-mode=swift -L /Users/admin/.jenkins/workspace/iOS/.build/debug -I /Users/admin/.jenkins/workspace/iOS/.build/debug/Modules -lDangerDepsLinter /var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/danger/5196ACCE-432E-4569-8C47-B23A61C80303/_tmp_dangerfile.swift runner /usr/local/lib/node_modules/danger/distribution/commands/danger-ci.js --process .build/debug/danger-swift --passURLForDSL --verbose /var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/danger-dsl-391a3e8c.json /var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/danger/5196ACCE-432E-4569-8C47-B23A61C80303/danger-response.json
Completed evaluation
ERROR: Dangerfile eval failed at Dangerfile.swift
ERROR: Could not get the results JSON file at /var/folders/qp/bcc51wv112750l2rsgqv21nw0000gn/T/danger/5196ACCE-432E-4569-8C47-B23A61C80303/danger-response.json
Failing the build, there is 1 fail.
Feedback:
Danger: ⅹ Failing the build, there is 1 fail.
## Failures
`danger-swift` failed.
## Markdowns
### Log patched a version in Package.swift to 3.0.0 as you mentioned |
@Sega-Zero I'm looking at your package.swift, I think DangerDepedencies needs to depend on Danger, for it to be linked
|
It will not compile then % swift build --cache-path ~/data/DangerCachedSources
Updating https://github.com/shibapm/Logger
Updating https://github.com/JohnSundell/Marathon
Updating https://github.com/danger/swift.git
Updating https://github.com/JohnSundell/ShellOut.git
Updating https://github.com/JohnSundell/Files.git
Updating https://github.com/JohnSundell/Require.git
Updating https://github.com/nerdishbynature/RequestKit.git
Updating https://github.com/JohnSundell/Releases.git
Updating https://github.com/apple/swift-argument-parser.git
Updated https://github.com/shibapm/Logger (0.51s)
Updating https://github.com/JohnSundell/CollectionConcurrencyKit.git
Updated https://github.com/JohnSundell/Files.git (0.82s)
Updated https://github.com/JohnSundell/ShellOut.git (0.82s)
Updated https://github.com/JohnSundell/Marathon (0.82s)
Updated https://github.com/apple/swift-argument-parser.git (0.82s)
Updated https://github.com/JohnSundell/Require.git (0.82s)
Updated https://github.com/nerdishbynature/RequestKit.git (0.82s)
Updated https://github.com/JohnSundell/Releases.git (0.82s)
Updated https://github.com/danger/swift.git (0.82s)
Updating https://github.com/nerdishbynature/octokit.swift
Updating https://github.com/jpsim/SourceKitten.git
Updating https://github.com/nicklockwood/SwiftFormat
Updating https://github.com/Realm/SwiftLint
Updating https://github.com/drmohundro/SWXMLHash.git
Updating https://github.com/jpsim/Yams.git
Updating https://github.com/krzyzanowskim/CryptoSwift.git
Updating https://github.com/scottrhoyt/SwiftyTextTable.git
Updated https://github.com/JohnSundell/CollectionConcurrencyKit.git (0.43s)
Updating https://github.com/swiftlang/swift-syntax.git
Updated https://github.com/swiftlang/swift-syntax.git (1.39s)
Updated https://github.com/nerdishbynature/octokit.swift (2.64s)
Updated https://github.com/jpsim/Yams.git (2.64s)
Updated https://github.com/jpsim/SourceKitten.git (2.64s)
Updated https://github.com/krzyzanowskim/CryptoSwift.git (2.64s)
Updated https://github.com/drmohundro/SWXMLHash.git (2.64s)
Updated https://github.com/nicklockwood/SwiftFormat (2.64s)
Updated https://github.com/Realm/SwiftLint (2.64s)
Updated https://github.com/scottrhoyt/SwiftyTextTable.git (2.64s)
Computing version for https://github.com/Realm/SwiftLint.git
Computed https://github.com/Realm/SwiftLint.git at 0.57.0 (0.49s)
Computing version for https://github.com/nicklockwood/SwiftFormat
Computed https://github.com/nicklockwood/SwiftFormat at 0.54.5 (0.63s)
Computing version for https://github.com/krzyzanowskim/CryptoSwift.git
Computed https://github.com/krzyzanowskim/CryptoSwift.git at 1.8.3 (0.62s)
Computing version for https://github.com/JohnSundell/CollectionConcurrencyKit.git
Computed https://github.com/JohnSundell/CollectionConcurrencyKit.git at 0.2.0 (0.61s)
Computing version for https://github.com/scottrhoyt/SwiftyTextTable.git
Computed https://github.com/scottrhoyt/SwiftyTextTable.git at 0.9.0 (0.61s)
Computing version for https://github.com/jpsim/Yams.git
Computed https://github.com/jpsim/Yams.git at 5.1.3 (0.61s)
Computing version for https://github.com/jpsim/SourceKitten.git
Computed https://github.com/jpsim/SourceKitten.git at 0.35.0 (0.62s)
Computing version for https://github.com/apple/swift-argument-parser.git
Computed https://github.com/apple/swift-argument-parser.git at 1.5.0 (0.47s)
Computing version for https://github.com/drmohundro/SWXMLHash.git
Computed https://github.com/drmohundro/SWXMLHash.git at 7.0.2 (0.62s)
Computing version for https://github.com/danger/swift.git
Computed https://github.com/danger/swift.git at 3.20.2 (0.59s)
Fetching https://github.com/mxcl/Version from cache
Fetched https://github.com/mxcl/Version from cache (0.52s)
Computing version for https://github.com/nerdishbynature/octokit.swift
Computed https://github.com/nerdishbynature/octokit.swift at 0.13.0 (0.61s)
Computing version for https://github.com/shibapm/Logger
Computed https://github.com/shibapm/Logger at 0.2.3 (0.61s)
Computing version for https://github.com/nerdishbynature/RequestKit.git
Computed https://github.com/nerdishbynature/RequestKit.git at 3.3.0 (0.61s)
Computing version for https://github.com/mxcl/Version
Computed https://github.com/mxcl/Version at 2.1.0 (0.72s)
Computing version for https://github.com/swiftlang/swift-syntax.git
Computed https://github.com/swiftlang/swift-syntax.git at 600.0.0-prerelease-2024-08-14 (0.74s)
Removing https://github.com/JohnSundell/ShellOut.git
Removing https://github.com/JohnSundell/Marathon
Removing https://github.com/JohnSundell/Files.git
Removing https://github.com/JohnSundell/Require.git
Removing https://github.com/JohnSundell/Releases.git
Working copy of https://github.com/danger/swift.git resolved at 3.20.2
Creating working copy for https://github.com/mxcl/Version
Working copy of https://github.com/mxcl/Version resolved at 2.1.0
error: 'experiment': product 'Danger' required by package 'experiment' target 'DangerDependencies' not found. Did you mean '.product(name: "Danger", package: "swift")'?
error: ExitCode(rawValue: 1)
[0/1] Planning build% |
finally got it working after changing the Package.swift to // swift-tools-version:5.9
import PackageDescription
let package = Package(
name: "Eigen",
products: [
.library(name: "DangerDepsLinter", type: .dynamic, targets: ["DangerDependencies"]), // dev
],
dependencies: [
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.54.0"),
.package(url: "https://github.com/danger/swift.git", from: "3.0.0"),
.package(url: "https://github.com/Realm/SwiftLint.git", from: "0.56.0")
],
targets: [
.target(name: "DangerDependencies", dependencies: [
.product(name: "Danger", package: "swift")
])
]
) |
@f-meloni I'm still getting some errors when using a vanilla danger setup with Swift 6 / Xcode 16 This is my Package.swift file // swift-tools-version:6.0
import PackageDescription
let package = Package(
name: "Eigen",
platforms: [.macOS(.v13)],
products: [
.library(
name: "DangerDeps",
type: .dynamic,
targets: ["DangerDependencies"]
)
],
dependencies: [
.package(
url: "https://github.com/danger/swift.git",
from: "3.20.2"
)
],
targets: [
.target(
name: "DangerDependencies",
dependencies: [
.product(
name: "Danger",
package: "swift"
),
]
)
]
) And this is the error I'm getting after running these commands:
Error:
Any idea what's happening here? |
Are you sure you are using the latest danger swift version? |
According to the resolved file yes, not sure what's going on {
"originHash" : "36abd041412583f5cd210268e843be9b5b8e8277411c70fb9c71ae0fdda24bdf",
"pins" : [
{
"identity" : "logger",
"kind" : "remoteSourceControl",
"location" : "https://github.com/shibapm/Logger",
"state" : {
"revision" : "53c3ecca5abe8cf46697e33901ee774236d94cce",
"version" : "0.2.3"
}
},
{
"identity" : "octokit.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/nerdishbynature/octokit.swift",
"state" : {
"revision" : "44192458beb89180c3a3a1245d904aacac8be0ae",
"version" : "0.13.0"
}
},
{
"identity" : "requestkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/nerdishbynature/RequestKit.git",
"state" : {
"revision" : "e4d905fed938807e36d87f28375f88b7c1c26840",
"version" : "3.3.0"
}
},
{
"identity" : "swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/danger/swift.git",
"state" : {
"revision" : "e43a19617fc905ef303b1af2f0449b99fc6ea0f2",
"version" : "3.20.2"
}
},
{
"identity" : "swiftformat",
"kind" : "remoteSourceControl",
"location" : "https://github.com/nicklockwood/SwiftFormat",
"state" : {
"revision" : "86ed20990585f478c0daf309af645c2a528b59d8",
"version" : "0.54.6"
}
},
{
"identity" : "version",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mxcl/Version",
"state" : {
"revision" : "303a0f916772545e1e8667d3104f83be708a723c",
"version" : "2.1.0"
}
}
],
"version" : 3
}
|
I think you don't need those two commands
Also can you please try Swift run without -c release? Just want to see what happens, thanks |
Getting this running
Same without the And with the same commands as before but without the flag:
I'm getting this error:
Swift version:
|
Try to remove the new line in
(Just write it like this, to match the regex) Then do not do the other steps just run danger-swift directly |
That worked, thank you! Btw, |
Yes |
Out of context but another observation is that |
Hi Team,
We are using Danger 3.19.1 on our Bitrise. before XCode 15 that working fine. After we upgrade to XCode 16, Bitrise throw the error:
################### DANGER ######################
Run danger
/var/folders/b8/9zt_tx3s1y37nzh_cs991xyc0000gn/T/danger/9D80CAB8-A906-4735-AD6E-128CA0161196/tmp_dangerfile.swift:2:8: error: no such module 'Danger'
1 | import Foundation
2 | import Danger
| `- error: no such module 'Danger'
3 |
4 | func checkReviewers( bitbucketCloud: BitBucketCloud) {
ERROR: Dangerfile eval failed at Dangerfile.swift
ERROR: Could not get the results JSON file at /var/folders/b8/9zt_tx3s1y37nzh_cs991xyc0000gn/T/danger/9D80CAB8-A906-4735-AD6E-128CA0161196/danger-response.json
Failing the build, there is 1 fail.
The text was updated successfully, but these errors were encountered: