Skip to content
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

Fix to call didFinishCommand #6757

Merged
merged 1 commit into from Oct 4, 2023
Merged

Conversation

omochi
Copy link
Contributor

@omochi omochi commented Jul 29, 2023

When XCBuildDelegate receives a taskComplete message, it calls buildSystem(:didStartCommand:) of BuildSystemDelegate.
However, it should probably call buildSystem(:didFinishCommand:).

Since there doesn't seem to be any concrete type conforming to BuildSystemDelegate, this change doesn't appear to have any impact on the behavior of existing code.

@@ -81,7 +81,7 @@ extension XCBuildDelegate: XCBuildOutputParserDelegate {
}
case .taskComplete(let info):
queue.async {
self.buildSystem.delegate?.buildSystem(self.buildSystem, didStartCommand: BuildSystemCommand(name: "\(info.taskID)", description: info.result.rawValue))
self.buildSystem.delegate?.buildSystem(self.buildSystem, didFinishCommand: BuildSystemCommand(name: "\(info.taskID)", description: info.result.rawValue))
Copy link
Member

@tomerd tomerd Jul 31, 2023

Choose a reason for hiding this comment

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

@neonichu @abertelrud this seems correct on the surface, but not sure if there are some subtleties that required this less-intuitive usage

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this is because of how SwiftPM's logging works? Since we do log in didStartCommand, maybe this was done to "fix" the log output when using XCBuild.

@tomerd
Copy link
Member

tomerd commented Sep 5, 2023

@swift-ci smoke test

@neonichu neonichu self-assigned this Sep 5, 2023
@MaxDesiatov
Copy link
Member

@swift-ci smoke test

@neonichu
Copy link
Member

neonichu commented Oct 4, 2023

@swift-ci please test

@neonichu
Copy link
Member

neonichu commented Oct 4, 2023

@swift-ci please test windows

@neonichu neonichu enabled auto-merge (squash) October 4, 2023 17:58
@neonichu neonichu merged commit 95d0160 into apple:main Oct 4, 2023
5 checks passed
@omochi omochi deleted the did-finish-command branch October 5, 2023 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants