1 |
On Mon, Sep 10, 2018 at 01:51:15PM -0700, Matt Turner wrote: |
2 |
> On Mon, Sep 10, 2018 at 1:34 PM Chí-Thanh Christopher Nguyễn |
3 |
> <chithanh@g.o> wrote: |
4 |
> > |
5 |
> > Jason Zaman schrieb: |
6 |
> > >> No. With -Werror, upstream indicates that if a warning occurs, the build |
7 |
> > >> should fail and the resulting code not be installed on user systems. |
8 |
> > >> |
9 |
> > >> Instead, someone knowledgeable should look at the situation *first* and |
10 |
> > >> determine whether it is a bogus warning, a trivial issue, or something which |
11 |
> > >> warrants further attention. |
12 |
> > >> |
13 |
> > >> I have long disagreed with QA policy on this, and think that ebuilds should |
14 |
> > >> respect upstream here. Of course giving users the ability to override. |
15 |
> > > |
16 |
> > > I disagree. -Werror means that upstream wants it to build without |
17 |
> > > warnings on their distro with their version of the compiler with their |
18 |
> > > versions of all the libraries. |
19 |
> > |
20 |
> > It means, upstream wants it to build without warnings everywhere. And if a |
21 |
> > warning occurs (due to change in compiler, libraries, architecture, etc.), |
22 |
> > have a developer look at it first before installing the code on user systems. |
23 |
> |
24 |
> This sounds good in theory, but I think it's pretty well established |
25 |
> that in practice this isn't effective and instead is a large waste of |
26 |
> time. In fact, the foundational premise that it's possible to build |
27 |
> without warnings everywhere is simply wrong. |
28 |
> |
29 |
> Consider again the bug that started this. The maintainer had not built |
30 |
> this configuration. None of the arch teams had built this |
31 |
> configuration until I did for the last architecture Cc'd. The patch |
32 |
> committed doesn't change anything installed on the system, if not for |
33 |
> Werror preventing the code from building. |
34 |
|
35 |
Replying to a somewhat random post. There are two separate things here |
36 |
that people are discussing here but are not the same thing. |
37 |
|
38 |
1) We want to know when a package has terrible warnings when installing |
39 |
it so we can report upstream and know that something might have gone |
40 |
wrong. |
41 |
|
42 |
2) There are a lot of spurious warnings that are worthless and would |
43 |
just annoy *everyone*. They are still legit warnings so its not like |
44 |
they should go away but they should not break the build. |
45 |
|
46 |
-Werror trips up on both of these which is why everyone dislikes it. |
47 |
We want to inform people about only 1) not 2). The solution to this is |
48 |
https://gitweb.gentoo.org/proj/portage.git/tree/bin/install-qa-check.d/90gcc-warnings |
49 |
(There is also an equivalent clang-warnings check too). These spit out |
50 |
"QA Notice: Package triggers severe warnings which indicate that it may |
51 |
exhibit random runtime failures." and a huge list of them. |
52 |
|
53 |
These are a focused list of the worst warnings that should be fixed |
54 |
first before all the others. If your goal is to improve the quality of |
55 |
code in general this qa-check is much better than using Werror on |
56 |
everything. |
57 |
|
58 |
Stick this in your make.conf: |
59 |
PORTAGE_ELOG_SYSTEM="echo save" |
60 |
PORTAGE_ELOG_CLASSES="warn error log qa" |
61 |
I'm pretty sure toralf's tinderbox already has these enabled but all |
62 |
devs should too. |
63 |
|
64 |
-- Jason |