-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[llvm-remarkutil] Auto-detect serializer format based on file extension #160545
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
[llvm-remarkutil] Auto-detect serializer format based on file extension #160545
Conversation
Created using spr 1.3.7-wip
} | ||
Format SerializerFormat = | ||
getSerializerFormat(OutputFileName, OutputFormat, Parser.ParserFormat); | ||
|
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.
WDYT about making the default be bitstream (unless the input was yaml), and then adding a warning/error message here if the output is a tty, kind of like opt
does when you try to write bitcode to the terminal? I think our "north star" should be to converge on "bitstream for everything except LIT tests".
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's a difficult trade-off imo. Working with these tools interactively in a tty, I personally like YAML as the default. I find that most often I call e.g. filter on huge bitstream files and pipe the result straight into vim/less for inspection. So if we do this, maybe instead of emitting the warning we can auto-switch to YAML if we detect tty and also add sth like -S
as a shorthand for --serializer=yaml
to make piping into text based tools easier?
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.
I like that!
If serializer format is set to Auto, try to detect user intent based on the file extension of the output file name. Pull Request: llvm#160545
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/138/builds/20312 Here is the relevant piece of the build log for the reference
|
…ile extension (#160545) If serializer format is set to Auto, try to detect user intent based on the file extension of the output file name. Pull Request: llvm/llvm-project#160545
…on (llvm#160545) If serializer format is set to Auto, try to detect user intent based on the file extension of the output file name. Pull Request: llvm#160545
If serializer format is set to Auto, try to detect user intent based on
the file extension of the output file name.