-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Filter codesign messages
#7285
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
Filter codesign messages
#7285
Conversation
|
@swift-ci please 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.
As a stopgap measure this looks fine, but I think we should have at least two tests for potential regressions here:
- Verifying that diagnostic messages from other build commands (like driver and linker errors etc) come through
- Verifying that
codesignoutput doesn't leak and the original issue is fixed
|
I think I can come up with a test for 2, but not sure what the concrete scenarios were for 1. I don't see any more info in the revert PR #7130. |
|
Does the linked issue to the revert PR #7114 provide enough info? IIRC all error diagnostic messages were no longer visible between the original attempt to fix it and the revert |
That doesn't seem plausible since we have tests involving diagnostics, e.g. various tests in |
|
Ok, some diagnostic messages didn't show up, as that's what @al45tair and @compnerd can confirm they were seeing as described in #7114 (comment), and I saw linker diagnostics swallowed too in my own builds. |
53d26bd to
8846f76
Compare
|
@swift-ci please test |
|
BTW, the fact that compiler diagnostics were swallowed by the original change is very concerning to me -- this points to severe issues in SwiftPM's build system and/or the compiler/driver since compiler diagnostics are supposed to go through a completely separate path from this. |
8846f76 to
6b5b348
Compare
|
@swift-ci please test |
|
@swift-ci please test windows |
|
ugh, |
Right now we end up with this output on relink: ``` /Users/neonacho/Projects/public/swift-package-manager/.build/arm64-apple-macosx/debug/swift-bootstrap: replacing existing signature ``` This change specifically filters any output from `codesign` commands which haven't failed and we aren't in verbose mode. This should eventually be possible at the command level, but for the time being this allows us to avoid shipping SwiftPM with this messy output. rdar://118937939
6b5b348 to
09169fd
Compare
|
@swift-ci please test |
|
@swift-ci please test windows |
4 similar comments
|
@swift-ci please test windows |
|
@swift-ci please test windows |
|
@swift-ci please test windows |
|
@swift-ci please test windows |
* **Explanation**: SwiftPM is code signing any binaries it produces on macOS in 5.10. Whenever a binary get relinked and resigned during incremental builds, it verbatim emits informational diagnostics to the log, which should only happen in verbose mode. Especially in projects which multiple binaries, this can make the log difficult to follow and may lead to confusion of users. * **Scope**: Any users on macOS will see this issue. * **Risk**: In theory, this change could lead to other diagnostics not being emitted, but the change is scoped to only code signing tasks, so the risk for this is very low. * **Testing**: Some new tests for SwiftPM's logging were added as part of this. * **Reviewer**: @MaxDesiatov * **Main branch PR**: #7285
Right now we end up with this output on relink:
This change specifically filters any output from
codesigncommands which haven't failed and we aren't in verbose mode.This should eventually be possible at the command level, but for the time being this allows us to avoid shipping SwiftPM with this messy output.
rdar://118937939