-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Build plugin executables with debug symbols #5659
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 smoke test |
🤔 |
That's actually the expected compilation error for which this unit test is testing diagnostics. It's unfortunate that this gets printed out where the automation is picking it up as an actual error. Rather the test failures seem to be:
|
This unit test basically checks that a plugin with an error produces the expected diagnostics, and then checks that those errors go away after a corrected plugin source file is written and the plugin is compiled again. |
Ok, I can repro this locally and this is really weird. The backstory is that this unit test checks a couple of plugin compilation diagnostics, including first that there is a compilation failure with a syntactically incorrect plugin source file, and then that when it's fixed in a way that leaves an unused variable, it checks that there is still a warning. Here's the weird part: when compiling without But when compiling with @neonichu I don't think the right thing is to dumb down the test here, because if the |
I've not seen this before, it sounds likely to be a compiler issue where |
Yah, I agree that we don't want to change the test -- that said I think we do want to get this into 5.7. I am going to open a 5.7 PR that modifies the test for now but leave this one open for main. |
Interesting, this might be a recent regression in the compiler? Initially, I wasn't able to reproduce it with my installed Xcode and using swift-5.7-DEVELOPMENT-SNAPSHOT-2022-07-05-a, the issue also does not reproduce. If I use swift-DEVELOPMENT-SNAPSHOT-2022-07-12-a, the issue does seem to reproduce. |
Actually, scratch that, the issue I am seeing locally with the |
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
OK, looks like we're clearly using the inferior compiler in smoke tests (e.g. |
c0f1e8e
to
1a3a656
Compare
@swift-ci please smoke test |
Can't repro with the 5.6.1 toolchain locally, either. Also using |
1a3a656
to
b323a50
Compare
@swift-ci please smoke test |
b323a50
to
6df66b4
Compare
@swift-ci please smoke test |
Added some more debug info and it definitely seems like the serialized diagnostics are simply missing the warning, but it is being emitted to the console. Don't see how this could be environmental, but maybe some quirk of the debug toolchain? |
Interesting, I can repro the issue locally with Swift 5.5.2 / Xcode 13C100. |
If I switch from the frontend flag to the driver flag |
I think I found the issue, if I pass |
This seems like the better default until we might add a dedicated debugging feature for plugins.
6df66b4
to
ac330c3
Compare
We should figure out how to enable the new driver in CI so that testing is closer to production, but that shouldn't block this PR. I introduced a new testing helper |
@swift-ci please smoke test |
We are seeing some failures in Swift CI that look similar to the compiler issue being worked around in #5659. For now, we will not assert if that particular part of the test fails and instead use `XCTSkip` plus log the bytes of the serialized diagnostics to the console. rdar://96517321
This seems like the better default until we might add a dedicated debugging feature for plugins.