-
Notifications
You must be signed in to change notification settings - Fork 127
Merge dumped dependency info #897
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
Merge dumped dependency info #897
Conversation
Sources/SWBTaskExecution/TaskActions/BuildDependencyInfoTaskAction.swift
Outdated
Show resolved
Hide resolved
Sources/SWBTaskExecution/TaskActions/BuildDependencyInfoTaskAction.swift
Outdated
Show resolved
Hide resolved
Since swiftlang#874, we are dumping per-target dependency information, this adds a new task which merges these for a given build request. The task is only created if there's at least one target in the graph that will dump dependency information, so should be a no-op for all builds right now. Additionally, this declares the dependency info file as an output of `ValidateDependencies` which I neglected to do in my earlier PR.
e097892 to
952eece
Compare
|
@swift-ci please test |
|
Looks like the failure in |
| guard let target = $0.configuredTarget?.target as? SWBCore.StandardTarget else { | ||
| return nil | ||
| } | ||
| guard target.sourcesBuildPhase?.buildFiles.isEmpty == false else { |
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.
Note there are some edge cases where empty targets still do some work (generation of the apple versioning .c file for example), I think there is code somewhere to handle that. If it doesn't hurt, you might just want to not skip based on this.
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.
You're right that we should handle this, but it seems like today the knowledge only exists inside SourcesTaskProducer and isn't readily accessible? Unless someone knows another way, I think I'd rather address this in a follow-up to keep a refactor of the logic in SourcesTaskProducer separate.
| fatalError("unexpected direct invocation") | ||
| } | ||
|
|
||
| public func createTasks(_ cbc: CommandBuildContext, _ delegate: any TaskGenerationDelegate, dumpDependencyPaths: [Path]) async { |
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.
dumpDependencyPaths here could probably be cbc.inputs
Since #874, we are dumping per-target dependency information, this adds a new task which merges these for a given build request. The task is only created if there's at least one target in the graph that will dump dependency information, so should be a no-op for all builds right now.
Additionally, this declares the dependency info file as an output of
ValidateDependencieswhich I neglected to do in my earlier PR.