Skip to content

[Batch Mode] Very simple and safe fix for batch mode diagnostic suppression bug. Includes tests. #19261

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

davidungar
Copy link
Contributor

A much smaller and safer fix for the batch mode bug where all diagnostic outputs could be truncated, leaving the user with no diagnostics.

Scope of issue: User gets no diagnostics when all errors are present in non-primaries, e.g. an Objective-C module import error.
Origination: Initial implementation of batch mode.
Risk: Very very small. Adds one flag, set in one place, tested in one place right where the bad behavior would otherwise occur.
Reviewed by: Jordan Rose informally, will get a formal review from him.
Testing: Normal regression tests.
Radar: rdar://43033749, clone of rdar://42314665.

rdar://44362180

@davidungar
Copy link
Contributor Author

@swift-ci please test

@jrose-apple
Copy link
Contributor

Looks good to me. We should also put the tests in master!

@davidungar
Copy link
Contributor Author

@swift-ci please nominate

@davidungar
Copy link
Contributor Author

I'll put the tests into master.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5d0702c

// Verify that -Wno-* options are applied.
// RUN: %empty-directory(%t)

// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -Xcc -Wno-#warnings 2>&1 | %FileCheck -check-prefix CHECK-NO-WARN -allow-empty %s

// XFAIL: linux
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops. Because I changed the test to explicitly pass -enable-objc-interop, it'll pass on Linux now too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! That explains it. Thanks.

@davidungar
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5d0702c

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 5d0702c

@davidungar davidungar merged commit 2dfdbf2 into swiftlang:swift-4.2-branch Sep 12, 2018
@davidungar davidungar deleted the rdar-43438753-and-43033749-fix-batch-mode-no-diags-swift-4.2-branch branch September 23, 2019 16:19
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.

3 participants