-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
FrontendArea → compiler: FrontendArea → compiler: FrontendcompilerThe Swift compiler itselfThe Swift compiler itself
Description
Using the -dump-ast -dump-ast-format json
flags logs all stdout/stderr from the compiler.
E.g.,
/usr/bin/swiftc -module-name SwiftHelloWorld <other-args-omitted> -dump-ast -dump-ast-format json
may result in:
{ // full json omitted }
error messages
...
#7 0x00007ff68b556ebe (.../Swift/Toolchains/6.1.2+Asserts/usr/bin/swift-frontend.exe+0x2046ebe)
...
warning messages
{ // another full json omitted }{ // another full json omitted }
...
Is there any swiftc flag to clean the output and actually only receive the json strings if any?
Piping the output (1>
, 2>
) does not help as many log messages are still intertwined with the actual json output.
Metadata
Metadata
Assignees
Labels
FrontendArea → compiler: FrontendArea → compiler: FrontendcompilerThe Swift compiler itselfThe Swift compiler itself