Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SwiftPM outputs raw diagnostics from SwiftDriver without trailing new…
…lines SwiftPM uses the Swift Driver's `-parseable-output` flag to get a sequence of length-prefixed JSON-encoded messages that it can read. Unfortunately the Swift Driver doesn't JSON-encode its own diagnostics, leading to things like #5968. I filed #5968 on the Swift Driver to get it to encode its JSON messages, but meanwhile, it turns out that we can fairly easily fix the fallback logic that SwiftPM uses when it emits raw output. It was simply missing a newline. It's safe to always add a newline to the raw driver output, since the logic that parses JSON splits by newlines, so we won't find any terminating newlines. Note that we don't add newlines to the output coming from messages from the compiler frontend, since that output already has trailing newlines. rdar://103608636
- Loading branch information