-
Notifications
You must be signed in to change notification settings - Fork 440
Add a Swift parser library that is written in Swift #616
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
This starts an effort to implement the parser for the Swift compiler in Swift itself. Co-authored-by: Robert Widmann <[email protected]> Co-authored-by: Doug Gregor <[email protected]> Co-authored-by: Rintaro Ishizaki <[email protected]>
@swift-ci Please test |
@compnerd, if you have a cycle or two, it's probably worth making sure this works on Windows. |
Doesn't seem to build on Windows (which is a regression). At the very least we will need swiftlang/swift-docc-plugin#26. |
The docc plugin is not required for this repository in general, and is not a dependency for this PR specifically. Docc support is built into Xcode, I am not sure why we have a plugin dependency as well. |
I couldn't answer why we have that. We should invert the condition so that it is not used by default. |
I'm fine with removing the DocC plugin dependency or inverting the condition. We shouldn't land this in a form that breaks the Windows build. |
Let's strike it for now. We shouldn't have merged it without verifying that it worked for Windows |
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 at least allows this PR to be built on Windows with:
swift build -Xcc -IC:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\include
Note that building this requires a locally built toolchain as there was a fix for SPM that is needed that has not had a new toolchain snapshot built due to other failures introduced by the rebranch.
Thank you @compnerd! Co-authored-by: Saleem Abdulrasool <[email protected]>
@swift-ci please test |
1 similar comment
@swift-ci please test |
@swift-ci please test |
@@ -0,0 +1,70 @@ | |||
## Overview |
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.
(not a blocker) The existence of this file triggers a warning, at least with 5.7:
warning: 'swift-syntax': found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
Sources/SwiftParser/README.md
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'll merge and we'll fix it up afterward. Thanks!
Nice. Swift would really benefit from code generating it's own code rather than C++. |
I can assure you that this does currently not work on Windows. I just tried using this framework in an SPM project on Windows. I am getting the following error:
|
Please use a build from main. At the very least, a recent snapshot. |
I used the most recent version.
As far as I am concerned, this is the most recent snapshot |
5.6 should be buildable - https://github.com/compnerd/swift-build/releases/tag/swift-format-5.6-RELEASE was built and would pull in swift-syntax 5.6. I wonder if the .1 has anything to do with it 🤔 |
@broken-bytes If you're looking to try the new parser that's the subject of this pull request, you'll need |
This starts an effort to implement the parser for the Swift compiler in Swift itself.
For more information, please see the announcement forum post at: https://forums.swift.org/t/a-new-swift-parser-for-swiftsyntax/59813