Skip to content

Introduce new compiler interface #364

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 1 commit into from
Apr 28, 2022

Conversation

hamishknight
Copy link
Contributor

Add the SPI interface swiftCompilerLexRegexLiteral and swiftCompilerParseRegexLiteral for the Swift compiler to call into. This allows us to avoid depending on other library API on the compiler side, while letting it keep the bridging gunk.

While we're here, add an extra String return for the parsing function that could allow us to change the regex emission format in the future. This still needs to be plumbed through on the complier side though.

Add the SPI interface
`swiftCompilerLexRegexLiteral` and
`swiftCompilerParseRegexLiteral` for the Swift
compiler to call into. This allows us to avoid
depending on other library API on the compiler
side, while letting it keep the bridging gunk.

While we're here, add an extra `String` return for
the parsing function that could allow us to change
the regex emission format in the future. This still
needs to be plumbed through on the complier side
though.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@milseman milseman left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Anything need to be done compiler-side for this?

@hamishknight
Copy link
Contributor Author

Yes, swiftlang/swift#58463 has the compiler side changes

@hamishknight hamishknight merged commit b7a03c9 into swiftlang:main Apr 28, 2022
@hamishknight hamishknight deleted the compiler-interface branch April 28, 2022 13:00
@milseman
Copy link
Member

Ok, do we need to do something in lock-step, or can we do it over multiple PRs / commits?

@hamishknight
Copy link
Contributor Author

hamishknight commented Apr 28, 2022

The compiler-side changes need to be applied with the next main -> swift/main merge. Unfortunately it seems a RegexBuilder change is currently blocking CI for that (https://ci.swift.org/job/swift-PR-Linux/1558). We could do possibly do a cherry-pick of this to swift/main in the mean time though, as I don't believe it should conflict with anything.

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