Skip to content

Use some RegexComponent in variadic inits #636

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

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

natecook1000
Copy link
Member

This updates VariadicsGenerator to print declaration with some RegexComponent<...> instead of the full generic signature, which will hopefully give the type checker more detailed information to work with about RegexComponentBuilder closures.

@xedin
Copy link

xedin commented Feb 15, 2023

Please test with following pull request:
swiftlang/swift#63677

@swift-ci please test

@@ -15,9 +15,9 @@
@available(SwiftStdlib 5.7, *)
extension Regex {
/// Creates a regular expression using a RegexBuilder closure.
public init<Content: RegexComponent>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this break ABI? Isn't some RegexComponent<Output> in the closure return type going to be an opaque return type, not a generic parameter on the parent declaration?

Copy link
Member Author

Choose a reason for hiding this comment

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

This particular change is just a syntactic transformation of the original. You can get into trouble with multiple generic parameters, since the order is important to the ABI, but luckily all of those are @_alwaysEmitIntoClient. (This one should probably be that as well, tbh.)

@xedin
Copy link

xedin commented Feb 15, 2023

Please test with following pull request:
swiftlang/swift#63677

@swift-ci please test

1 similar comment
@xedin
Copy link

xedin commented Feb 15, 2023

Please test with following pull request:
swiftlang/swift#63677

@swift-ci please test

@xedin
Copy link

xedin commented Feb 15, 2023

@swift-ci please test

2 similar comments
@xedin
Copy link

xedin commented Feb 16, 2023

@swift-ci please test

@xedin
Copy link

xedin commented Feb 16, 2023

@swift-ci please test

@xedin
Copy link

xedin commented Feb 16, 2023

I guess we have to wait some more...

@natecook1000
Copy link
Member Author

Yeah, I don't think the compiler change has landed in the nightly yet, so probably not until later Friday.

@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000
Copy link
Member Author

Alright, the compiler changes are in the swift-DEVELOPMENT-SNAPSHOT-2023-02-16-a toolchain — just need that in CI for this to be ready.

@natecook1000
Copy link
Member Author

@swift-ci Please test

2 similar comments
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000
Copy link
Member Author

@swift-ci Please test

…anges_workaround"

This reverts commit 7e059b7, reversing
changes made to 3ca8b13.
This supports a type checker fix after the change in how result
builder closure parameters are type-checked.
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit 1358fc0 into swiftlang:main Feb 20, 2023
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