[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 1/5] Remove hardcoded strict -Werror checking



On Tue, Dec 27, 2016 at 5:07 PM, Andrew Cooper
<andrew.cooper3@xxxxxxxxxx> wrote:
> On 27/12/16 15:53, Jan Beulich wrote:
>>>>>
>>>>> "Jan Beulich" <jbeulich@xxxxxxxx> 12/27/16 4:42 PM >>>
>>>>> Alistair Francis <alistair.francis@xxxxxxxxxx> 12/22/16 8:14 PM >>>
>>>>
>>>> Everyone seems fairly open to an override. Is a environment variable,
>>>> which if set will disable Werror acceptable? Something like NO_ERROR=Y
>>>> which will result in no -Werror being appended.
>>>
>>> I dislike environment variables for such purposes, and would prefer
>>> requiring
>>> such to be added as make options. If it was an environment variable, it
>>> should start with XEN_. And its name should fully reflect the purpose,
>>> i.e. I
>>> shouldn't have to guess what kinds of errors would be suppressed. Perhaps
>>> WARN_NO_ERROR?
>>
>> That said, I'm not sure everyone agreed on putting an override in place. I
>> think
>> Andrew had made it quite clear that there is a reason for -Werror to be in
>> use,
>> and we shouldn't encourage people weakening code by tolerating warnings
>> (even if for the purpose of upstream integration no warnings will be
>> permitted
>> anyway, due to -Werror remaining the default).
>
>
> For development, -Werror should remain the default.
>
> For downstream integration, an ability to override -Werror is useful for
> distros, especially in cases of using a newer compiler than the code was
> ever developed against.
>
> However, it should definitely be the case that a positive choice needs to be
> taken to disable -Werror, which should hopefully make people thing twice
> about doing so.

Wouldn't it make more sense to disable -Werror for the release?

This seems similar to ASSERT().  The idea behind having ASSERT()
enabled during development and disabled for releases is that there are
different goals for each.  During development you expect things to be
unstable and crash, and you want to fix anything that comes up, and
you definitely want to catch as many bugs as you possibly can.  Once
something is released and put into production, the priority changes --
the goal now is to keep the system up and running, not to find bugs;
so everything for which an incorrect assumption is *less bad* than a
crash should not crash.

Similarly, during development we definitely want all the help we can
get to find programmer mistakes; and so having the build fail every
time gcc detects something funny is a big help for that.

But with a release, the priorities are different.  Releases are not
for developers, but for downstreams and for users.  They're not really
in a position to fix the issue.  And in any case, whatever the issue
is, it's pretty certain that dozens of other places with older
compilers are *already* running with that issue and just don't know
about it.  So running without -Werror *just for the release* makes the
project as a whole more useful for downstreams and users, without
hurting development, it seems to me.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.