-
Notifications
You must be signed in to change notification settings - Fork 465
Remove remaining references to gyb #1425
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
|
@swift-ci Please smoke test |
|
@swift-ci Please test |
| To re-generate the files after changing `CodeGeneration` run the `generate-swiftsyntax` | ||
| target of `CodeGeneration` and pass `path/to/swift-syntax/Sources` as the argument. |
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.
generate-source-code still exists. If you'd prefer generate-swiftsyntax, it'd be nice to spell it out completely:
swift run --package-path CodeGeneration generate-swiftsyntax Sources
(not sure if we handle the relative path there)
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 prefer to tell people to just run generate-swiftsyntax now. I’d like to reduce the number of uses for build-script.py. Maybe one day we can even get rid of that last remaining Python script.
I added the command though, that’s a good suggestion.
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.
Do we need to keep generate-source-code?
|
|
||
| On the command line, this would be | ||
| ```bash | ||
| swift run --package-path CodeGeneration generate-swift Sources |
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.
| swift run --package-path CodeGeneration generate-swift Sources | |
| swift run --package-path CodeGeneration generate-swiftsyntax Sources |
CodeGeneration/README.md
Outdated
| Some source code inside SwiftSyntax is generated using [SwiftSyntaxBuilder](../Sources/SwiftSyntaxBuilder), a Swift library whose purpose is to generate Swift code using Swift itself. This kind of code generation is performed by the Swift package defined in this directory. | ||
|
|
||
| This directory is a standalone package that uses a pinned version of SwiftSyntaxBuilder. It is thus NOT using SwiftSyntaxBuilder of the parent directory. This guarantees that when `generate-swiftsyntaxbuilder` is run, it can't break its own build. | ||
| This directory is a standalone package that uses a pinned version of SwiftSyntaxBuilder. It is thus NOT using SwiftSyntaxBuilder of the parent directory. This guarantees that when `generate-swiftsyntaxbuilder` is run, it can't break its own build. |
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.
Looks like this was changed to generate-swiftsyntax. That also needs to be updated in all the generateCopyrightHeader expressions.
Personally I'd prefer generate-swift-syntax :P
EDIT: Also, it's probably worth putting how to generate here as well. I would personally miss the ChangingSwiftSyntax.md one.
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.
Good catch. Done 👍🏽
As to renaming generate-swiftsyntax to generate-swift-syntax that would be another PR but I agree.
848df95 to
36a9ee0
Compare
|
@swift-ci Please test |
|
@swift-ci Please test |
|
@swift-ci please test windows |
|
@swift-ci Please test Windows |
bnbarham
left a comment
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.
LGTM. The extra documentation could be a separate PR if you want given this is just cleaning up gyb references.
| ``` | ||
| $ ./build-script.py verify-source-code --toolchain /path/to/toolchain/usr | ||
| ``` | ||
| Or if you open the `CodeGeneration` package in Xcode, you can add the argument using |
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.
Same change here as in the other file
| ```python | ||
| TypeAttribute('_myAttribute'), # Becomes @_myAttribute in the compiler | ||
| ``` | ||
| ```swift |
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.
Do we have documentation for what these fields mean, especially traits + parserFunction?
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 we do not. We should add them as doc comments.
|
@swift-ci Please test |
|
@swift-ci Please test Windows |
gybis gone from this repository for good and all remaining references should be removed. I’m also removing the implementation status of SwiftParser because it’s no longer up to date and doesn’t seem to provide any value anymore.