From eaa8f2ca81e812fb41187fe15b425337a0971d94 Mon Sep 17 00:00:00 2001 From: Dima Hutsuliak Date: Wed, 25 Sep 2024 13:18:46 +0200 Subject: [PATCH] Keep dependencies at end of parameter list --- Sources/ScipioKit/Producer/FrameworkProducer.swift | 6 +++--- Sources/ScipioKit/Producer/PIF/PIFCompiler.swift | 6 +++--- Sources/ScipioKit/Producer/PIF/ToolchainGenerator.swift | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Sources/ScipioKit/Producer/FrameworkProducer.swift b/Sources/ScipioKit/Producer/FrameworkProducer.swift index 0b16d578..3b3c7c9f 100644 --- a/Sources/ScipioKit/Producer/FrameworkProducer.swift +++ b/Sources/ScipioKit/Producer/FrameworkProducer.swift @@ -52,8 +52,8 @@ struct FrameworkProducer { cacheMode: Runner.Options.CacheMode, overwrite: Bool, outputDir: URL, - fileSystem: any FileSystem = localFileSystem, - toolchainEnvironment: [String: String]? = nil + toolchainEnvironment: [String: String]? = nil, + fileSystem: any FileSystem = localFileSystem ) { self.descriptionPackage = descriptionPackage self.baseBuildOptions = buildOptions @@ -61,8 +61,8 @@ struct FrameworkProducer { self.cacheMode = cacheMode self.overwrite = overwrite self.outputDir = outputDir - self.fileSystem = fileSystem self.toolchainEnvironment = toolchainEnvironment + self.fileSystem = fileSystem } func produce() async throws { diff --git a/Sources/ScipioKit/Producer/PIF/PIFCompiler.swift b/Sources/ScipioKit/Producer/PIF/PIFCompiler.swift index 29a95c78..bae94f27 100644 --- a/Sources/ScipioKit/Producer/PIF/PIFCompiler.swift +++ b/Sources/ScipioKit/Producer/PIF/PIFCompiler.swift @@ -18,17 +18,17 @@ struct PIFCompiler: Compiler { descriptionPackage: DescriptionPackage, buildOptions: BuildOptions, buildOptionsMatrix: [String: BuildOptions], + toolchainEnvironment: [String: String]? = nil, fileSystem: any FileSystem = TSCBasic.localFileSystem, - executor: any Executor = ProcessExecutor(), - toolchainEnvironment: [String: String]? = nil + executor: any Executor = ProcessExecutor() ) { self.descriptionPackage = descriptionPackage self.buildOptions = buildOptions self.buildOptionsMatrix = buildOptionsMatrix + self.toolchainEnvironment = toolchainEnvironment self.fileSystem = fileSystem self.executor = executor self.buildParametersGenerator = .init(buildOptions: buildOptions, fileSystem: fileSystem) - self.toolchainEnvironment = toolchainEnvironment } private func fetchDefaultToolchainBinPath() async throws -> AbsolutePath { diff --git a/Sources/ScipioKit/Producer/PIF/ToolchainGenerator.swift b/Sources/ScipioKit/Producer/PIF/ToolchainGenerator.swift index 7d3519e5..6a048093 100644 --- a/Sources/ScipioKit/Producer/PIF/ToolchainGenerator.swift +++ b/Sources/ScipioKit/Producer/PIF/ToolchainGenerator.swift @@ -11,17 +11,17 @@ import struct Basics.Triple struct ToolchainGenerator { private let toolchainDirPath: AbsolutePath - private let executor: any Executor private let environment: [String: String]? + private let executor: any Executor init( toolchainDirPath: AbsolutePath, - executor: any Executor = ProcessExecutor(), - environment: [String: String]? = nil + environment: [String: String]? = nil, + executor: any Executor = ProcessExecutor() ) { self.toolchainDirPath = toolchainDirPath - self.executor = executor self.environment = environment + self.executor = executor } func makeToolChain(sdk: SDK) async throws -> UserToolchain {