-
Notifications
You must be signed in to change notification settings - Fork 441
Clean up dead code #1080
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
Clean up dead code #1080
Conversation
I didn't touch any public or codegen'd declarations, only internal or lower declarations that weren't used in anywhere in this project, including tests. These unused declarations were found using a SwiftLint rule that's still in development.
@@ -374,31 +374,6 @@ struct FileIDMacro: ExpressionMacro { | |||
} | |||
} | |||
|
|||
struct FileMacro: ExpressionMacro { |
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.
@DougGregor Do we still need this?
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.
It can't really work until we get build configuration information into the macro evaluation context, so I'm fine with removing it.
@swift-ci test |
Sorry @CodaFi, forgot to update for CMake. That's done now and builds cleanly for me with |
@swift-ci test |
Even though I'm not sure how this can be used considering it's `internal` and SwiftSyntax still compiles without it, but CI is clearly failing when it's not there. ``` Undefined symbols for architecture x86_64: "(extension in SwiftSyntax):SwiftSyntax.SyntaxProtocol.withoutTrivia() -> A", referenced from: swiftASTGen.evaluateMacro(sourceFilePtr: Swift.UnsafePointer<Swift.UInt8>, sourceLocationPtr: Swift.UnsafePointer<Swift.UInt8>?, expandedSourcePointer: Swift.UnsafeMutablePointer<Swift.UnsafePointer<Swift.UInt8>?>, expandedSourceLength: Swift.UnsafeMutablePointer<Swift.Int>) -> Swift.Int in Macros.swift.o ld: symbol(s) not found for architecture x86_64 ```
That last failure is interesting.
|
@swift-ci test |
@swift-ci test |
1 similar comment
@swift-ci test |
@CodaFi looks like CI's back from vacation so I think this could be merged now. |
@swift-ci test |
I didn't touch any public or codegen'd declarations, only internal or lower declarations that weren't used in anywhere in this project, including tests.
I also opted to keep some of the unused code that serves as local development helpers, things like
recursiveDescription
since that seems best to keep around even if not used.I'm happy to re-add anything that's useful to keep around.
By the way, these unused declarations were found using a SwiftLint rule that's still in development, partly powered by SwiftSyntax itself.