File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
XCRemoteCache/Commands/Swiftc Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,16 @@ protocol SwiftcProductsGenerator {
4444/// Products generator that doesn't create any swiftmodule. It is used in the compilation swift-frontend mocking, where
4545/// only individual .o files are created and not .swiftmodule of -Swift.h (which is part of swift-frontend -emit-module invocation)
4646class NoopSwiftcProductsGenerator : SwiftcProductsGenerator {
47- func generateFrom( artifactSwiftModuleFiles: [ SwiftmoduleFileExtension : URL ] , artifactSwiftModuleObjCFile: URL ) throws -> SwiftcProductsGeneratorOutput {
48- printWarning ( " Invoking module generation from NoopSwiftcProductsGenerator which does nothing. It might be an error of the swift-frontend mocking. " )
49- // TODO: Refactor API: this url is never used: NoopSwiftcProductsGenerator is intended only for the swift-frontend
47+ func generateFrom(
48+ artifactSwiftModuleFiles: [ SwiftmoduleFileExtension : URL ] ,
49+ artifactSwiftModuleObjCFile: URL
50+ ) throws -> SwiftcProductsGeneratorOutput {
51+ printWarning ( """
52+ Invoking module generation from NoopSwiftcProductsGenerator which does nothing. \
53+ It might be an error of the swift-frontend mocking.
54+ """ )
55+ // TODO: Refactor API: this url is never used:
56+ // NoopSwiftcProductsGenerator is intended only for the swift-frontend
5057 let trivialURL = URL ( fileURLWithPath: " /non-existing " )
5158 return SwiftcProductsGeneratorOutput ( swiftmoduleDir: trivialURL, objcHeaderFile: trivialURL)
5259 }
Original file line number Diff line number Diff line change 2020import Foundation
2121import XCRemoteCache
2222
23- /// Wrapper for a `swift-frontend` that skips compilation and produces empty output files (.o). As a compilation dependencies
23+ /// Wrapper for a `swift-frontend` that skips compilation and
24+ /// produces empty output files (.o). As a compilation dependencies
2425/// (.d) file, it copies all dependency files from the prebuild marker file
2526/// Fallbacks to a standard `swift-frontend` when the ramote cache is not applicable (e.g. modified sources)
2627public class XCSwiftcFrontendMain {
27- // swiftlint:disable:next function_body_length
28+ // swiftlint:disable:next function_body_length cyclomatic_complexity
2829 public func main( ) {
2930 let env = ProcessInfo . processInfo. environment
3031 let command = ProcessInfo ( ) . processName
3132 let args = ProcessInfo ( ) . arguments
32-
33-
3433 var compile = false
3534 var emitModule = false
3635 var objcHeaderOutput : String ?
@@ -43,7 +42,7 @@ public class XCSwiftcFrontendMain {
4342 var diagnosticsPaths : [ String ] = [ ]
4443 var sourceInfoPath : String ?
4544 var docPath : String ?
46-
45+
4746 for i in 0 ..< args. count {
4847 let arg = args [ i]
4948 switch arg {
You can’t perform that action at this time.
0 commit comments