-
Notifications
You must be signed in to change notification settings - Fork 461
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
fixed/shorted-use(fix #5176) #5223
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Akarsh Sahlot <akarshsahlot7@gmail.com>
Signed-off-by: Akarsh Sahlot <122122123+AkarshSahlot@users.noreply.github.com>
I tried to run cmake to build the updated compiler, for its building since day before yesterday, |
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.
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
Files not reviewed (1)
- lib/options.cpp: Language not supported
frontends/p4/p4-lex.c | ||
frontends/p4/p4-parse.cpp | ||
py-compile | ||
|
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.
You should not remove this file
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.
ok I will add it back
@@ -19,6 +19,10 @@ limitations under the License. | |||
#include "lib/null.h" | |||
|
|||
namespace P4 { | |||
void Util::Options::shortUsage() { | |||
*outStream << binaryName << ": Error in command line options" << std::endl; |
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.
There should have already been printed an error message like "Unknown option --x" or "Option --x is missing a required argument", so this line of output seems redundant.
To start with you could post your error output to see what's wrong. Try to get everything working locally first. |
Right now, when we type a wrong command like p4c --wrong-option, the program shows a huge help message with all options. We want to make it show just a short error message that tells you to use --help.
changes needed that I have done:
Added a new function shortUser that shows a short error message (instead of the long help previous message error).
I Replaced all locations where usage() is called on errors with this new shortUser() message.
Fixes #5176