-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Move All the Gyb Support for Syntax out of Swift #60859
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
Pairs well with swiftlang/swift-syntax#663 |
@@ -623,6 +623,11 @@ if(CMAKE_C_COMPILER_ID MATCHES Clang) | |||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Werror=c++98-compat-extra-semi>) | |||
endif() | |||
|
|||
# Make sure we know where swift-syntax is because we need it to build the parser. | |||
if(NOT EXISTS "${SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably stick to a more conventional directory naming scheme.
Something like SWIFT_SYNTAX_SOURCE_DIR
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the name actually works well for the current state of things - all the external repositories use this current naming scheme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true. Diverges from LLVM, but I guess that's common around these parts.
This is going to require a change to compnerd/swift-build to ensure that we do not break the Windows CI there. Please ensure that we synchronise the changes when this is merged. |
Do we need to worry about the CI build scripts for Windows? |
64fa1d1
to
bebf91c
Compare
swiftlang/llvm-project#5236 will unblock the windows bot. I'll make sure it's blue before I merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To support this change into Windows CI, we also need to remove line 125 in build-windows.bat
, and make identical changes to build-windows-toolchain.bat
. Both files are used on Swift CI.
@swift-ci test windows |
whoa |
Make libSyntax depend on swift-syntax: the new home for all of this infrastructure. This greatly simplifies the addition and amending of syntax nodes as only the swift-syntax paired with a swift checkout will need to be changed. This is in contrast to the existing build flow where a paired PR to both repos must be made to change anything here. Note that a paired PR may still be required if the legacy parser needs to be adjusted in response to syntax nodes changing, but I anticipate this to be a much more infrequent event now that the C++ end of libSyntax is deprecated.
Fix `build-windows-toolchain.bat` after #60859
Make libSyntax depend on swift-syntax: the new home for all
of this infrastructure. This greatly simplifies the addition and
amending of syntax nodes as only the swift-syntax paired with a
swift checkout will need to be changed. This is in contrast to
the existing build flow where a paired PR to both repos must be
made to change anything here.
Note that a paired PR may still be required if the legacy parser
needs to be adjusted in response to syntax nodes changing, but I
anticipate this to be a much more infrequent event now that
the C++ end of libSyntax is deprecated.