-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[5.10][ASTGen] Move regex literal parsing from SwiftCompilerSources to ASTGen #69937
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASTGen always builds with the host Swift compiler, without requiring bootstrapping, and is enabled in more places. Move the regex literal parsing logic there so it is enabled in more host environments, and makes use of CMake's Swift support. Enable all of the regex literal tests when ASTGen is built, to ensure everything is working. Remove the "AST" and "Parse" Swift modules from SwiftCompilerSources, because they are no longer needed. (cherry picked from commit 47f18d4) Conflicts: SwiftCompilerSources/CMakeLists.txt SwiftCompilerSources/Sources/AST/DiagnosticEngine.swift SwiftCompilerSources/Sources/Optimizer/PassManager/Context.swift SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift include/swift/Bridging/ASTGen.h lib/ASTGen/Package.swift lib/ASTGen/Sources/ASTGen/Bridge.swift lib/ASTGen/Sources/ASTGen/Regex.swift lib/Parse/Lexer.cpp lib/Parse/ParseRegex.cpp
swiftrt.obj is required for making things work (cherry picked from commit abd4164)
HeaderDependencies.cpp and the stdlib filelist didn't have dependencies. That causes issues when the content is changed. (cherry picked from commit f327bf7)
This is not used anymore (cherry picked from commit 986415a) Conflicts: include/swift/Parse/RegexParserBridging.h lib/ASTGen/Sources/ASTGen/Regex.swift
Member
Author
|
@swift-ci Please test |
Member
Author
|
@swift-ci Please Build Toolchain |
Member
Author
|
@swift-ci Please test |
Member
Author
|
@swift-ci Please Build Toolchain |
_Nonnull is not a thing in Windows `cl.exe`. Since it's not needed in C++, just remove it.
b11cf36 to
1d95d69
Compare
Member
Author
|
@swift-ci Please test |
Member
Author
|
@swift-ci Please Build Toolchain |
Regex literal parsing is now built as a part of ASTGen, that requires host toolchain and swift-syntax integration. (cherry picked from commit ee982fd)
Member
Author
|
@swift-ci Please test |
bnbarham
approved these changes
Nov 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick #69838 and #69930 into
release/5.10ASTGenalways builds with the host Swift compiler, without requiring bootstrapping, and is enabled in more places. Move the regex literal parsing logic there so it is enabled in more host environments including Windows, and makes use of CMake's Swift support. Also this includes an important CMake fix for Windows; previously,swift-frontendwasn't linked withswiftrt.obj, that may caused numerous unexpected issues.ASTGenis built, to ensure everything is working.