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

build: do not print the default value of --c++-standard in help output #2447

Merged

Conversation

tchaikov
Copy link
Contributor

before this change, the output of ./configure.py --help looks like:

  --c++-standard CPP_STANDARD
                        C++ standard to build with [default: ]

because the default value of --c++-standard option is an empty string. printing out its value is not helpful, and could be confusing.

as the actual default value of this option varies depending on the used compiler, so even if we print out the deduced C++ standard, it is still confusing. not to mention that argparse does not differentiate the defaulted value in the returned namespace from parse_args() from the user specified one. so, a simpler approach is just do not specify the default value.

in this change, we

  • do not specify the default value for --c++-standard, so its value would be None if not specified
  • do not print its default value in the --help output

before this change, the output of `./configure.py --help` looks like:
```
  --c++-standard CPP_STANDARD
                        C++ standard to build with [default: ]
```

because the default value of `--c++-standard` option is an empty string.
printing out its value is not helpful, and could be confusing.

as the actual default value of this option varies depending on the
used compiler, so even if we print out the deduced C++ standard,
it is still confusing. not to mention that argparse does not
differentiate the defaulted value in the returned namespace from
`parse_args()` from the user specified one. so, a simpler approach
is just do not specify the default value.

in this change, we

* do not specify the default value for `--c++-standard`, so its
  value would be `None` if not specified
* do not print its default value in the `--help` output

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
Copy link
Contributor Author

@scylladb/seastar-maint hello maintainers, could you help review this change?

@avikivity avikivity merged commit 3b85633 into scylladb:master Sep 25, 2024
15 checks passed
@tchaikov tchaikov deleted the configure-cxx-standard-default-val branch September 25, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants