Gentoo Archives: gentoo-dev

From: "Chí-Thanh Christopher Nguyễn" <chithanh@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] acceptable alternatives to -Werror, was: Changing policy about -Werror
Date: Wed, 12 Sep 2018 23:34:40
Message-Id: 95a6e581-f005-99de-23ae-87a8e6014f1b@gentoo.org
In Reply to: [gentoo-dev] Changing policy about -Werror by Andrew Savchenko
1 Hi!
2
3 So from the discussion I gather that -Werror has both desirable and
4 undesirable effects. Question is, can we somehow mitigate the undesirable
5 effects while still retaining the desirable effects as much as possible?
6
7 Requirements:
8 * Bother the user enough that they will report the problem, but not enough
9 that they will leave Gentoo for another distro, which means:
10 * Do not fail to build/install when a warning is encountered
11 * Do not silently install the package anyway when a warning is encountered
12
13 Rough suggestion:
14
15 1. Introduce a new value in ebuilds for PROPERTIES, named "warningfree" (or
16 something similar for RESTRICT if that is preferable).
17 2. Introduce a new package set, named @broken-warningfree. If a package is in
18 this set, emerge will display a notification each time it runs (like with
19 @preserved-rebuild).
20 3. Extend install-qa-check.d/90gcc-warnings so that optionally all compiler
21 warnings will be caught
22 4. If PROPERTIES="warningfree" is set, 90gcc-warnings catches all compiler
23 warnings
24 5. If PROPERTIES="warningfree" is set, and there is a warning caught, add the
25 package to the @broken-warningfree set on install
26 6. If there is no warning caught, remove the package from the
27 @broken-warningfree set (if it is currently in there)
28 7. When ebuild maintainers remove -Werror from a package, they can set
29 PROPERTIES="warningfree" at their discretion
30
31 Also possible is to introduce FEATURES="strict-warnings" or similar, which
32 will cause the build to fail if warnings are encountered in a warningfree
33 ebuild. I need to think more how this could work with binpkgs though.
34
35
36 Best regards,
37 Chí-Thanh Christopher Nguyễn

Replies