-
Notifications
You must be signed in to change notification settings - Fork 472
Enable assertions in CI even if we are building in release builds #1342
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 test |
d272fed to
c3ec859
Compare
|
@swift-ci Please test |
c3ec859 to
29987c0
Compare
|
@swift-ci Please test |
29987c0 to
91f10e7
Compare
|
@swift-ci Please test |
91f10e7 to
ebef3e5
Compare
|
@swift-ci Please test |
|
@swift-ci please test Windows |
ebef3e5 to
45134da
Compare
|
Rationale behind whether we should override the
|
|
@swift-ci Please test |
Sources/SwiftSyntax/Assert.swift
Outdated
| @_transparent | ||
| public func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) { | ||
| #if SWIFTSYNTAX_ENABLE_ASSERTIONS | ||
| precondition(condition(), message(), file: file, line: line) |
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 could change this to fatalError rather than precondition so we get messages still. Or not, probably doesn't really matter.
| "TokenDiagnostic.swift", | ||
| ], | ||
| "Internal": [ | ||
| "Assert.swift", |
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.
Needs to be added to CMakeLists.txt as well
45134da to
b1dd041
Compare
|
@swift-ci Please test |
This overrides the standard `assert` function from the stdlib with a version also checks the condition in CI if a conditional compilation flag is passed.
b1dd041 to
e001fb1
Compare
|
@swift-ci Please test |
|
@swift-ci Please test Windows |
This overrides the standard
assertfunction from the stdlib with a version also checks the condition in CI if a conditional compilation flag is passed.rdar://106874411