Skip to content

Commit

Permalink
Remove unused outputDirectory arg and misc. warnings.
Browse files Browse the repository at this point in the history
Signed-off-by: furby™ <[email protected]>
  • Loading branch information
furby-tm committed Nov 26, 2024
1 parent a42e29f commit 08d6cf2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Sources/schema-gen/SchemaGenerator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import SwiftParser
import SwiftSyntax

extension FileHandle: TextOutputStream {
extension FileHandle: Swift.TextOutputStream {
public func write(_ string: String) {
let data = Data(string.utf8)
self.write(data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ enum SwiftPackageManager {
architectures: [BuildArchitecture],
platform: Platform,
platformVersion: String,
outputDirectory: URL,
hotReloadingEnabled: Bool = false
) -> Result<Void, SwiftPackageManagerError> {
log.info("Starting \(configuration.rawValue) build")
Expand Down Expand Up @@ -118,7 +117,7 @@ enum SwiftPackageManager {
directory: packageDirectory,
runSilentlyWhenNotVerbose: false
)
case .failure(let error):
case .failure(_):
#if os(macOS)
let helpMsg = "brew install xcbeautify"
#else
Expand Down Expand Up @@ -184,7 +183,6 @@ enum SwiftPackageManager {
architectures: [BuildArchitecture],
platform: Platform,
platformVersion: String,
outputDirectory: URL,
hotReloadingEnabled: Bool = false
) -> Result<URL, SwiftPackageManagerError> {
#if os(macOS)
Expand Down Expand Up @@ -214,7 +212,6 @@ enum SwiftPackageManager {
architectures: architectures,
platform: platform,
platformVersion: platformVersion,
outputDirectory: outputDirectory,
hotReloadingEnabled: hotReloadingEnabled
).flatMap { _ in
let buildPlanFile = scratchDirectory.appendingPathComponent("\(configuration).yaml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ enum XcodeBuildManager {
architectures: [BuildArchitecture],
platform: Platform,
platformVersion: String,
outputDirectory: URL,
hotReloadingEnabled: Bool = false
) -> Result<Void, XcodeBuildManagerError> {
log.info("Starting \(configuration.rawValue) build")
Expand All @@ -46,7 +45,7 @@ enum XcodeBuildManager {
directory: packageDirectory,
runSilentlyWhenNotVerbose: false
)
case .failure(let error):
case .failure(_):
#if os(macOS)
let helpMsg = "brew install xcbeautify"
#else
Expand All @@ -58,7 +57,7 @@ enum XcodeBuildManager {
""")
}

let archString = architectures.flatMap({ $0.rawValue }).joined(separator: "_")
let archString = architectures.compactMap({ $0.rawValue }).joined(separator: "_")

var additionalArgs: [String] = []
if platform != .macOS {
Expand Down Expand Up @@ -130,8 +129,7 @@ enum XcodeBuildManager {
"-scheme", product,
"-configuration", configuration.rawValue.capitalized,
"-usePackageSupportBuiltinSCM",
"-derivedDataPath", packageDirectory.appendingPathComponent(".build/\(archString)-apple-\(platform.sdkName)").path,
"-archivePath", outputDirectory.appendingPathComponent(product).path
"-derivedDataPath", packageDirectory.appendingPathComponent(".build/\(archString)-apple-\(platform.sdkName)").path
] + additionalArgs,
directory: packageDirectory,
runSilentlyWhenNotVerbose: false
Expand Down
4 changes: 1 addition & 3 deletions Sources/swift-bundler/Commands/BundleCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ struct BundleCommand: AsyncCommand {
platformVersion: platformVersion
).unwrap()
} else {
let archString = architectures.flatMap({ $0.rawValue }).joined(separator: "_")
let archString = architectures.compactMap({ $0.rawValue }).joined(separator: "_")
// for some reason xcodebuild adds a platform suffix like Release-xrsimulator for visionOS
// however; for macOS there is no platform suffix at all.
let platformSuffix = arguments.platform == .macOS ? "" : "-\(arguments.platform.sdkName)"
Expand All @@ -266,7 +266,6 @@ struct BundleCommand: AsyncCommand {
architectures: architectures,
platform: arguments.platform,
platformVersion: platformVersion,
outputDirectory: outputDirectory,
hotReloadingEnabled: hotReloadingEnabled
).mapError { error in
return error
Expand All @@ -280,7 +279,6 @@ struct BundleCommand: AsyncCommand {
architectures: architectures,
platform: arguments.platform,
platformVersion: platformVersion,
outputDirectory: outputDirectory,
hotReloadingEnabled: hotReloadingEnabled
).mapError { error in
return error
Expand Down
1 change: 0 additions & 1 deletion Sources/swift-bundler/Commands/RunCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ struct RunCommand: AsyncCommand {
architectures: architectures,
platform: arguments.platform,
platformVersion: platformVersion,
outputDirectory: bundle,
hotReloadingEnabled: true
).unwrap()
log.info("Successfully built dylib")
Expand Down

0 comments on commit 08d6cf2

Please sign in to comment.