Skip to content

spurious leading newline in multiline function signatures #275

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

Closed
tayloraswift opened this issue Jun 17, 2024 · 2 comments
Closed

spurious leading newline in multiline function signatures #275

tayloraswift opened this issue Jun 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tayloraswift
Copy link
Owner

for some reason, there are spurious leading newlines in the signatures for https://swiftinit.org/docs/swift-service-lifecycle/servicelifecycle/servicegroup#s:ScA12_ConcurrencyE14assertIsolated_4file4lineySSyXK_s12StaticStringVSutF

@tayloraswift tayloraswift added the bug Something isn't working label Jun 17, 2024
@tayloraswift
Copy link
Owner Author

it seems there is a bug in SwiftSyntax 510 that causes source ranges to become misaligned with source text when removing trivia nodes. we cannot upgrade SwiftSyntax because this package uses macros. so for now, we just replace all newline characters with spaces before parsing declarations. (08d8998)

@tayloraswift
Copy link
Owner Author

link swiftlang/swift-syntax#2687

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant