Gentoo Archives: gentoo-dev

From: Sergei Trofimovich <slyfox@g.o>
To: Alon Bar-Lev <alonbl@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Changing policy about -Werror
Date: Fri, 14 Sep 2018 19:53:56
Message-Id: 20180914205346.3315a5d9@sf
In Reply to: Re: [gentoo-dev] Changing policy about -Werror by Alon Bar-Lev
1 On Fri, 14 Sep 2018 19:40:13 +0300
2 Alon Bar-Lev <alonbl@g.o> wrote:
3
4 > On Fri, Sep 14, 2018 at 12:34 AM Sergei Trofimovich <slyfox@g.o> wrote:
5 > >
6 > > On Tue, 11 Sep 2018 12:44:38 +0300
7 > > Alon Bar-Lev <alonbl@g.o> wrote:
8 > >
9 > > I'm personally in favour of not allowing -Werror
10 > > to be in build system unconditionally.
11 > >
12 > > Maintainer is free to implement --enable-werror any way
13 > > it's convenient to run on their own extended sanity checks
14 > > and optionally expose it to users. Be it USE flag or
15 > > EXTRA_ECONF option.
16 >
17 > This discussion is not for downstream to have a more strict policy
18 > than upstream.
19
20 Correct.
21
22 To clarify: I was talking only about packages with following properties:
23 1. existing -Werror enabled upstream by default (or unconditionally)
24 2. disabled by default downstream by default (WRT current policy)
25
26 Nothing more.
27
28 > > Do you intend to keep -Werror for case when ebuild goes
29 > > stable as well?
30 >
31 > Correct.
32 >
33 > > If you do it then what is your workflow to fix breakages
34 > > appearing in stable packages caused by minor environment
35 > > changes like toolchain tweaks?
36 >
37 > Correct.
38 >
39 > > Add another round of stabilization on each arch team? It
40 > > sounds like your default assumption that code needs to be
41 > > changed in a semantically significant way: add annotations
42 > > that might not like some toolchains, remove unused code.
43 >
44 > No dependency of toolchain nor annotations.
45 > A strict policy of no warnings will require changes as dependencies
46 > including toolchain are progressing.
47 > This creates an overhead for selected packages.
48 > A maintainer and the non-stable team should be able to know the package status.
49 > Preferably this may be done by automation, I appreciate the work of
50 > Toralf Förster with tinderbox to automate check various cases.
51 > When a new slot of toolchain is available, maintainers should check
52 > their packages in any case, there are other issues and side affects
53 > that we experienced, especially in C++ packages.
54 > For these packages usually there are 3 for each slot: the current
55 > stable, the next stable and the non-stable, so the overhead is
56 > constrained.
57
58 Sorry. I'm afraid I missed your answer. I'll restate the question again:
59
60 If you do it then what is your workflow to fix breakages
61 appearing in stable packages caused by minor environment
62 changes like toolchain tweaks?
63
64 I mean mechanically as a package maintainer.
65
66 Since you did not mention it I see a few alternatives:
67 - revbump a package with a backport of a local fix and fast-track
68 stabilization without usual soak time in ~arch
69 - pull new upstream version and fast-track stabilization without
70 usual soak time in ~arch
71 - no revbump, apply the patch as-is and hope it does not break
72 existing users.
73 - anything else?
74
75 > > Unused variable is a good example of typical benign warning:
76 > > it was there all the time, it's not a new bug and does not
77 > > warrant need for an immediate fix.
78 >
79 > Unused variable is a good example of CRITICAL potential issue
80
81 I understand you point. I disagree with it.
82
83 My litmus test: if behaviour of the package did not change after
84 the fix then the issue was not real.
85
86 > > Toolchain just happend to get better at control flow graph
87 > > analysis. Fix can easily wait for next release and save
88 > > everyone's time.
89 >
90 > Once again, the number of permutation of build and architecture may
91 > reveal issues that are cannot be detected on maintainer machine.
92 > If a fix is a real issue that is found in stable package, do you
93 > suggest to wait for next release to save whose time?
94
95 It's up to maintainer to decide on how to resolve the issue once
96 maintainer understands the scope of the problem.
97
98 > Once again I outlined the cases in which -Werror can be preserved, I
99 > will repeat... (a) upstream has strict policy of no-warnings, (b)
100 > upstream added -Werror, (c) downstream opinion is that upstream is
101 > following the policy, (d) upstream is friendly, (e) downstream accepts
102 > the potential maintenance overhead.
103
104 Your proposal is clear. Thanks for restating it.
105
106 I still think keeping -Werror enabled by default makes more harm
107 than good.
108
109 > > Gentoo does not normally run tests on user's systems either.
110 > > Tests are arguably a lot more precise in pointing out real
111 > > problems in software.
112 >
113 > Correct. I believe that this may be revisit as well, for selected
114 > packages in which tests are stable run them on user machines. There is
115 > no reason why we cannot add a directive to ebuild to enable tests by
116 > default and let user to disable this to save CPU/time of build.
117
118 Additional thanks for considering an option to disable tests back.
119
120 --
121
122 Sergei

Replies

Subject Author
Re: [gentoo-dev] Changing policy about -Werror Alon Bar-Lev <alonbl@g.o>