Swift-driver integration, Part II: add Swift front-end parsing stage by polac24 · Pull Request #209 · spotify/XCRemoteCache

@polac24

Part II (out of IV) of the swift driver integration:

  • Introduces xcswift-frontend wrapper that parses input parameters and stores them into the structured module (struct)
  • Adds (very experimental for now) enable_swift_driver_integration config that will enable the driver integration
  • Plugs in XCSwiftFrontend and SwiftFrontendOrchestrator that are no-op for now, but in a follow-up PR will add swift-frontend processes synchronization

Previous PR: #208

@polac24

@polac24

@polac24

polac24

file: primaryInputFilesURLs[i],
dependencies: dependenciesPaths.get(i).map(URL.init(fileURLWithPath:)),
object: outputPaths.get(i).map(URL.init(fileURLWithPath:)),
// for now - swift-dependencies are not requested in the driver compilation mode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least I have never seen that

}

override public func run() throws {
// TODO: implement in a follow-up PR

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be added separately to keep this PR small(er)


func run(criticalSection: () throws -> Void) throws {
// TODO: implement synchronization in a separate PR
try criticalSection()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be added separately to keep this PR small(er)

@polac24 polac24 changed the title Add Swift front-end parsing stage Swift-driver integration, Part II: add Swift front-end parsing stage

May 31, 2023

@polac24 polac24 marked this pull request as ready for review

May 31, 2023 04:56

aleksandergrzyb

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some typos. Looks great!

let customRewriteEnvs: [String]?
let irrelevantDependenciesPaths: [String]?
let gracefullyHandleMissingCommonSha: Bool?
let enableSwifDriverIntegration: Bool?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let enableSwifDriverIntegration: Bool?
let enableSwiftDriverIntegration: Bool?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same in others. 👀

// -target is required
case emitMissingTarget
// -moduleName is required
case emiMissingModuleName

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case emiMissingModuleName
case emitMissingModuleName

@polac24

aleksandergrzyb

This was referenced

Jun 4, 2023