-
Notifications
You must be signed in to change notification settings - Fork 440
Documentation - Typos & Consistency Fixes #1841
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
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.
Hi @joey-gm and welcome to SwiftSyntax! 🥳
Thanks for going trough the documentation and typos.
I see that you have changed some files in the generated files.
Those files are generated automatically by the Codegenerator.
Those files should be changed in the corresponding template file.
After that you navigate inside CodeGeneration folder and run swift run generate-swiftsyntax ../Sources
This will ensure that the generated code at update correctly.
If there is any question feel free to comment on this PR and I will gladly help you.
@@ -1575,8 +1575,7 @@ public struct MissingStmtSyntax: StmtSyntaxProtocol, SyntaxHashable { | |||
} | |||
} | |||
|
|||
/// A placeholder, i.e. `<#statement#>` that can be inserted into the source code to represent the missing pattern. | |||
/// This token should always have `presence = .missing`. | |||
/// A placeholder, i.e. `<#statement#>` that can be inserted into the source code to represent the missing pattern./// This token should always have `presence = .missing`. |
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.
Seems like CodeGeneration fails to add a proper line break for this particular comment.
I tried various line break options (e.g. extra spaces) in the codegen file below without avail.
@kimdv Thanks for the guidance and instruction! I have fixed the typos in the corresponding template files under CodeGeneration, and have re-generated the swift codes. All files should now be in sync. |
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.
Thank you for fixing all those typos @joey-gm. I’ve got a couple of comments inline, otherwise it looks good to me.
CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift
Outdated
Show resolved
Hide resolved
Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift
Outdated
Show resolved
Hide resolved
Thanks! Incorporated your suggestions. |
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.
Thanks. Two more comments.
Could you also squash your commits? It just makes for a nicer git history.
CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxVisitorFile.swift
Outdated
Show resolved
Hide resolved
/// The enum describes how the SyntaxVistor should continue after visiting | ||
/// The enum describes how the SyntaxVisitor should continue after visiting |
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 don’t think you re-generated SyntaxVisitor. If you did, this line would be
/// The enum describes how the ``SyntaxVisitor`` should continue after visiting
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.
One more squash of these two commits and we’re ready to merge.
All done. Thanks! |
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.
Thanks. Once CI passes, I’ll merge the PR
@swift-ci Please test |
@joey-gm Unfortunately we’ve got a merge conflict now. Could you rebase your changes on top of The CI failures are because we need to update a test case in the apple/swift repo, which I’m doing in swiftlang/swift#66950. |
Head branch was pushed to by a user without write access
@swift-ci Please test |
Hi Alex @ahoppen, I've rebased and recommitted the changes. Below are the steps I’ve taken. Could you please review and make sure I’ve rebased properly? (I’m an amateur and not too familiar with git’s branch management. I skimmed through the changes in the latest commit and they look okay.) Thanks! (Sync my (Regenerate codes) (Soft reset, commit, and push) |
@swift-ci please test windows |
You’re rebase looks good, @joey-gm. |
@swift-ci Please test |
CI is currently failing with an unrelated issue (#1855). I’ll trigger CI agains once that issue has been resolved. |
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
A few tests in this repo failed, AFAICT mostly because of the “preceed” -> “precede” rename. Could you adjust those failing test cases? |
Fixed the typos and also changed the "eofToken" terminology to "endOfFileToken" in Tests/SwiftSyntaxTest/DebugDescriptionTests.swift Passed all the tests in my local branch (macOS) |
Have a PR open for fixing the |
@joey-gm if you rebase this branch it should be fixed |
@swift-ci please test |
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.
Thank you 🙏🏽
@swift-ci Please test |
@swift-ci Please test macOS |
Thank you! Let’s trigger CI again. |
@swift-ci Please test |
@swift-ci Please test 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.
CI found one more inconsistency where you only updated a generated file. I hope that we can get this merged soon.
/// The arguments of the initializer. While the function signature allows specifying an return clause, doing so is not semantically valid. | ||
/// The arguments of the initializer. While the function signature allows specifying a return clause, doing so is not semantically valid. |
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 file is being generated. You need to also fix the typo here:
Head branch was pushed to by a user without write access
@@ -1353,7 +1353,7 @@ public let DECL_NODES: [Node] = [ | |||
Child( | |||
name: "Body", | |||
kind: .node(kind: .codeBlock), | |||
documentation: "The initializer’s body. Missing if the initialier is a requirement of a protocol declaration.", | |||
documentation: "The initializer’s body. Missing if the initializer is a requirement of a protocol declaration.", |
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.
Fixed one more typo and regenerated the codes
Updated. Please kindly test. :) |
@swift-ci Please test |
@swift-ci Please test |
Fixes some typos and formatting inconsistencies.