-
Notifications
You must be signed in to change notification settings - Fork 847
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
"Did you mean...?" (make config errors more helpful) #1269
Conversation
@@ -2862,34 +2860,61 @@ void CConfig::SetConfig_Parsing(istream& config_buffer){ | |||
if (!option_name.compare("RELAXATION_FACTOR_ADJFLOW")) | |||
newString.append("Option RELAXATION_FACTOR_ADJFLOW is now RELAXATION_FACTOR_ADJOINT, " | |||
"and it also applies to discrete adjoint problems.\n\n"); | |||
if (!option_name.compare("WRT_MESH_QUALITY")) | |||
else if (!option_name.compare("WRT_MESH_QUALITY")) |
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.
Wouldn't this prevent multiple warnings from being printed? Not sure if that's the point (or Im misunderstanding).
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.
No, those checks for deprecated options were already mutually exclusive.
You get multiple messages from the outer loop over all options in the config, and so you will also get multiple "did you mean?"s if you misspell more than one option.
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.
Ahh I missed the outer loop. Thanks.
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.
This looks good to me! Thanks for updating, should be way more user friendly now.
} | ||
if (Kind_SU2 == SU2_COMPONENT::SU2_CFD) { | ||
SU2_MPI::Error(string("SU2_CFD: Config option DIRECT_DIFF= YES requires AD or complex support!\n") + | ||
string("Please use SU2_CFD_DIRECTDIFF (configuration/compilation is done using the preconfigure.py script)."), |
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.
please make this meson.py
in #1272
Proposed Changes
suggest an alternative for unrecognized options
list the enum alternatives when an invalid one is used