Repository navigation
Conversation
Preserve the default enabled safety configuration while correctly handling enable, disable, and invalid values for both safety options.
|
Hi, could you take a look at this PR when you get a chance @corona10 |
Documentation build overview
135 files changed ·
|
|
I've updated this PR. Both options now stay disabled by default, as decided in gh-124064.
This affects 3.14 and 3.15 as well, so it should be backported. |
|
cc @AA-Turner |
maaz7409
left a comment
There was a problem hiding this comment.
Looks Good, the --disable-* fix works in my Linux checks. Also, would it make sense to keep accepting values such as =1, =true and an empty =? These currently enable the flags, so rejecting them could break existing build scripts after a backport.
| [AS_CASE([$enableval], | ||
| [yes|no], [enable_safety=$enableval], | ||
| [AC_MSG_ERROR([invalid --enable-safety option: expected "yes" or "no"])])], |
There was a problem hiding this comment.
Would treating any value other than no as enabled work here? This would keep --enable-safety=1, =true and an empty = working while honoring --disable-safety:
| [AS_CASE([$enableval], | |
| [yes|no], [enable_safety=$enableval], | |
| [AC_MSG_ERROR([invalid --enable-safety option: expected "yes" or "no"])])], | |
| [AS_VAR_IF([enable_safety], [no], [], [enable_safety=yes])], |
| [AS_CASE([$enableval], | ||
| [yes|no], [enable_slower_safety=$enableval], | ||
| [AC_MSG_ERROR([invalid --enable-slower-safety option: expected "yes" or "no"])])], |
There was a problem hiding this comment.
Perhaps the same approach could work for --enable-slower-safety too? If these suggestions are used, configure would also need regenerating.
| [AS_CASE([$enableval], | |
| [yes|no], [enable_slower_safety=$enableval], | |
| [AC_MSG_ERROR([invalid --enable-slower-safety option: expected "yes" or "no"])])], | |
| [AS_VAR_IF([enable_slower_safety], [no], [], [enable_slower_safety=yes])], |
|
Thank you for the great suggestion! I'll update my code accordingly. |
Preserve the default enabled safety configuration while correctly handling enable, disable, and invalid values for both safety options.
configuremishandles the default and--disable-*forms of the safety options #156764