-
Notifications
You must be signed in to change notification settings - Fork 49
Reduce buildBlock
overloads with pairwise buildBlock(combining:into:)
#114
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
17f3055
to
2c66ee6
Compare
buildBlock
buildBlock
overloads with pairwise buildBlock(combining:into:)
2c66ee6
to
ec66d20
Compare
ec66d20
to
97f4edc
Compare
eede636
to
c9c9028
Compare
@swift-ci please test linux |
c9c9028
to
d853aae
Compare
@swift-ci please test |
@swift-ci please test Linux |
@swift-ci please clean test linux |
/build/branch-main/swift-experimental-string-processing/Sources/PatternConverter/PatternConverter.swift:69:18: error: ambiguous use of 'renderAsPattern(maxTopDownLevels:minBottomUpLevels:)'
00:23:28 let render = ast.renderAsPattern(
00:23:28 ^
00:23:28 /build/branch-main/swift-experimental-string-processing/Sources/_MatchingEngine/Regex/Printing/PrintAsPattern.swift:20:15: note: found this candidate
00:23:28 public func renderAsPattern(
00:23:28 ^
00:23:28 /build/branch-main/swift-experimental-string-processing/Sources/_StringProcessing/PrintAsPattern.swift:22:15: note: found this candidate
00:23:28 public func renderAsPattern(
00:23:28 ^ Such a strange error. There's only one |
@swift-ci please clean test Linux |
d853aae
to
e4529bc
Compare
@swift-ci please test Linux |
e4529bc
to
5fe6e17
Compare
@swift-ci please clean test linux |
I suspect it's a stale file on the CI machine, and a clean test didn't fix it. I'll rename |
5fe6e17
to
bfe6ba7
Compare
…o:)`. This patch replaces `O(2^arity)` overloads of `buildBlock` with `O(arity^2)` overloads of `buildBlock(combining:into:)` with the language feature implemented in swiftlang/swift#40799. This improves library compilation time, and fixes an issue where nested captures did not have a flattened type. Before this patch, fixing this would need `O(arity!)` overloads. This also allows us to switch back to native tuples for `Match`. Also, rename `renderAsPattern` to `renderAsBuilderDSL` to work around a CI stale file issue.
bfe6ba7
to
8763e2d
Compare
@swift-ci please test Linux |
Merging to unblock things. Additional feedback welcome. |
This patch replaces
O(2^arity)
overloads ofbuildBlock
withO(arity^2)
overloads ofbuildBlock(combining:into:)
with the language feature implemented in swiftlang/swift#40799. This improves library compilation time, and fixes an issue where nested captures did not have a flattened type. Before this patch, fixing this would needO(arity!)
overloads. This also allows us to switch back to native tuples forMatch
.Also, rename
renderAsPattern
torenderAsBuilderDSL
to work around a CI stale file issue.This depends on swift-DEVELOPMENT-SNAPSHOT-2022-02-03 or later.