Skip to content
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

[SR-11431] Add flag to write parsable output to a file #53832

Open
keith opened this issue Sep 7, 2019 · 6 comments
Open

[SR-11431] Add flag to write parsable output to a file #53832

keith opened this issue Sep 7, 2019 · 6 comments

Comments

@keith
Copy link
Collaborator

@keith keith commented Sep 7, 2019

Previous ID SR-11431
Radar None
Original Reporter @keith
Type Improvement
Additional Detail from JIRA
Votes 2
Component/s Compiler
Labels Improvement, Driver
Assignee None
Priority Medium

md5: 43d47a9af044bd22af2102693db656cb

Issue Description:

Currently if you'd like to capture the parseable output from a build, you need to handle that from stderr, and process it immediately if you want to display it for users. In some use cases it would be nice to be able to write this output to a file, while still outputting the normal output, so that file could be parsed later optionally, while not changing the normal output.

@belkadan
Copy link
Contributor

@belkadan belkadan commented Sep 9, 2019

I feel a little weird about programs doing their own tee, but most command-lines don't make it easy to tee stderr.

@kastiglione
Copy link
Contributor

@kastiglione kastiglione commented Sep 12, 2019

Jordan, I was thinking you could specify a path and all parseable output would go there and not to stderr. I'm not sure it would need to go to both file and stderr, would it?

@belkadan
Copy link
Contributor

@belkadan belkadan commented Sep 12, 2019

That was Keith's description. I agree that just rerouting to a file would be much easier (and there's no reason that file couldn't be a pipe if someone wanted to do clever Unixy things).

@kastiglione
Copy link
Contributor

@kastiglione kastiglione commented Sep 13, 2019

I think what Keith may have meant is parseable output to file, and then using stdout/stderr for normal ("unparseable") output. In that way, you'd still see diagnostics come through the normal way, presumably for a human to read, with the full parseable info available separately to tools.

@keith
Copy link
Collaborator Author

@keith keith commented Sep 13, 2019

Yes my original suggestion was what @kastiglione said, parseable output to a file "normal" (non-parseable) output to stderr as if you don't pass `-parseable-output`

@belkadan
Copy link
Contributor

@belkadan belkadan commented Sep 13, 2019

Ahh, okay. I'm not sure we're currently set up to report things both ways but I see no reason why it wouldn't work.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants