-
Notifications
You must be signed in to change notification settings - Fork 207
Print commands required to explicitly build module dependencies. #104
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
Print commands required to explicitly build module dependencies. #104
Conversation
Do we have a swift style guide akin to: https://llvm.org/docs/CodingStandards.html ? |
As far as API design and naming questions: https://swift.org/documentation/api-design-guidelines/ For other stylistic decisions, this style guide is pretty close to standard library style, and should be preferred for this project as well IMO: https://google.github.io/swift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some project context and thoughts on error handling.
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
bbaf4b9
to
e3aef4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyGraph.swift
Outdated
Show resolved
Hide resolved
e3aef4d
to
412c1f8
Compare
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftDriver/Dependency Scanning/ModuleDependencyBuildGeneration.swift
Outdated
Show resolved
Hide resolved
412c1f8
to
d1b8f88
Compare
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes needed are minor and can be handled in a follow-up, but please add some tests with some simple Clang + Swift modules and their dependencies, so we can check that a reasonable set of jobs are printed.
d1b8f88
to
73fbc9b
Compare
73fbc9b
to
60197c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this after we ran into it on another PR -- Please add the new files to the appropriate CMakeLists.txt before merging
60197c8
to
20234bb
Compare
@owenv, thanks for catching this. |
20234bb
to
e29950d
Compare
@swift-ci please test |
This PR resurrects swiftlang#47 and builds on top of it. Adds new flag -driver-print-module-dependencies-jobs to instruct the driver to scan for dependencies and generate build jobs for each dependent Swift or C module. At present, this WIP does the following: - Invoke the Swift frontend Fast Dependency Scanner to prescan for dependencies. - Construct a Module Dependency Graph from the dependency scanner's JSON output. - Generate and print build jbos for each dependent module. Next Steps: Actually have the driver schedule and execute the dependent module build jobs ahead of time, eliminating the need to re-build those modules when it tries to import them.
e29950d
to
d8c6c24
Compare
@swift-ci please test |
1 similar comment
@swift-ci please test |
This PR resurrects #47 and builds on top of it.
Adds new flag
-driver-print-module-dependencies-jobs
to instruct the driver to scan for dependencies and generate build jobs for each dependent Swift or C module.At present, this WIP does the following:
Next Steps:
I am new to writing Swift so I encourage reviewers to nit-pick with extreme prejudice.