-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Build/Commands] Switch SymbolGraphExtract
to use build plan
#7863
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
Conversation
@swift-ci please test |
@@ -121,7 +136,7 @@ public enum ModuleBuildDescription { | |||
|
|||
/// Determines the arguments needed to run `swift-symbolgraph-extract` for | |||
/// this module. | |||
package func symbolGraphExtractArguments() throws -> [String] { | |||
public func symbolGraphExtractArguments() throws -> [String] { |
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.
why public?
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.
Because it’s a witness to a public protocol requirement now
@@ -216,6 +216,10 @@ public class BuildPlan: SPMBuildCore.BuildPlan { | |||
AnySequence(self.productMap.values.map { $0 as SPMBuildCore.ProductBuildDescription }) | |||
} | |||
|
|||
public var buildModules: AnySequence<SPMBuildCore.ModuleBuildDescription> { |
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.
The other member uses AnySequence so I used the same for consistency.
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.
Overall LGTM, but I second Rauhul's comments, and CI issues need to be resolved.
Yet another step on the path to remove `buildTriple` from `Resolved{Product, Module}`. Instead of trying to lookup modules in the module graph and then going the build plan for their descriptions, symbol-graph-extract should refer to the build plan directly.
b8d848e
to
3faf021
Compare
@swift-ci please test |
@swift-ci please test Windows platforms |
Yet another step on the path to remove
buildTriple
fromResolved{Product, Module}
.Motivation:
Instead of trying to lookup modules in the module graph and then going the build plan for their descriptions, symbol-graph-extract should refer to the build plan directly.
Modifications:
ModuleBuildDescription
to SPMBuildCoreBuild.ModuleBuildDescription
toSPMCore.ModuleBuildDescription
Result:
One less place that replies on
buildTriple
which brings us closer to its eventual removal.