Skip to content

Commit 8bc71f0

Browse files
authored
Merge pull request #1311 from ahoppen/ahoppen/disable-tokenkind-assertions
Disable assertions that check TokenKind
2 parents 78de9ef + 65d57c4 commit 8bc71f0

File tree

2 files changed

+8
-350
lines changed

2 files changed

+8
-350
lines changed

Sources/SwiftSyntax/Raw/RawSyntaxNodes.swift.gyb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,15 @@ public struct Raw${node.name}: Raw${node.name if node.is_base() else node.base_t
149149
% end
150150
% end
151151
% if child.is_optional:
152-
assert(${child.swift_name} == nil || ${' || '.join([f'{child.swift_name}?.tokenKind{base} == {choice}' for (base, choice) in choices])}, "Received \(String(describing: ${child.swift_name}?.tokenKind))")
152+
%{
153+
# FIXME: Assert disabled because normal CI doesn't have assertions enabled and debug CI seems to fail in a variety of places with this assertion
154+
# assert(${child.swift_name} == nil || ${' || '.join([f'{child.swift_name}?.tokenKind{base} == {choice}' for (base, choice) in choices])}, "Received \(String(describing: ${child.swift_name}?.tokenKind))")
155+
}%
153156
% else:
154-
assert(${' || '.join([f'{child.swift_name}.tokenKind{base} == {choice}' for (base, choice) in choices])}, "Received \(${child.swift_name}.tokenKind)")
157+
%{
158+
# FIXME: Assert disabled because normal CI doesn't have assertions enabled and debug CI seems to fail in a variety of places with this assertion
159+
# assert(${' || '.join([f'{child.swift_name}.tokenKind{base} == {choice}' for (base, choice) in choices])}, "Received \(${child.swift_name}.tokenKind)")
160+
}%
155161
% end
156162
% end
157163
% end

0 commit comments

Comments
 (0)