git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] ci: let pedantic job compile with -Og

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 6, 2024, 08:25 UTC
Message-ID
<ZmFyi1fQ14tVy7Xg@tanuki>
In-Reply-To
<20240606080552.GA658959@coredump.intra.peff.net>
On Thu, Jun 06, 2024 at 04:05:52AM -0400, Jeff King wrote:
Show 27 quoted lines
> On Thu, Jun 06, 2024 at 09:41:56AM +0200, Patrick Steinhardt wrote:
> > I kind of wonder whether we should revamp this pedantic job in the first
> > place. The consequence of that job is that our codebase needs to be
> > compile cleanly with `-Wpedantic`. So if that is a requirement anyway,
> > why don't we run all jobs with `DEVOPTS=pedantic` and just drop this job
> > altogether? This may surface some additional warnings on platforms where
> > we currently don't set that, but is that a bad thing?
> 
> Yeah, if we always compile cleanly with pedantic, then I don't see why
> it wouldn't just be the default for DEVELOPER=1. The point of that flag
> is to be as picky as possible so that we catch things early. If some
> platform can't handle it (let's imagine Windows or something), then I
> think we should be explicitly _disabling_ pedantic there.
> 
> > The only downside I can think of is that we stop compiling on Fedora,
> > which may have a more up-to-date GCC version than Ubuntu. But if the
> > goal of this job was to _really_ get an up-to-date compiler toolchain,
> > then we should rather pick a rolling release distro like Arch. Otherwise
> > I find this to be of dubious benefit.
> 
> There may be some value in general in compiling on multiple distros, as
> a sort of "unknown unknowns" thing. We don't know what we might turn up,
> but exposing ourselves to more variables may lead to catching failures
> before users see them.
> 
> I don't know if Fedora was specifically chosen for recent gcc there, or
> if it was simply for variety.

True enough. But even so, I think the better solution here would be to drop one of the Ubuntu-based jobs and then convert the Fedora one into a fully-fledged job that also runs tests.

That's something for a later iteration, though.
> Once again, these overlapping variables within various jobs make it hard
> to reason about (but I don't propose normalizing all of them; that would
> increase the amount of CPU work by a lot; I am just grumbling).

No arguing there, it certainly is hard to discover overall. I don't really think there's a way around this if we want to have different combinations while not running a full matrix of jobs, because the combinations are always going to be arbitrary.

> But yeah, between Arch and Fedora, I don't have an opinion. Doing both
> might even be valuable, if we are shoving random variations into random
> jobs. ;)
True.
Show 7 quoted lines
> > If we merge it into the other jobs, then I'd just pick any random job
> > that uses "ubuntu:latest" like "linux-gcc-default" to compile with
> > `-Og`.
> 
> That would be OK with me. I also think it would be OK to do nothing for
> now. We saw one case where "-Og" found a warning that "-O2" didn't. We
> could wait to see if it happens twice before acting. I dunno.

I don't think it hurts to have a job with `-Og`, and if it detects some corner cases that we otherwise don't I think there's a real benefit. In the best case, I'd want to give everyone the tools to avoid sending patch series to the mailing list which are broken and where that could have been detected earlier. In the end, it saves everybody's time.

Patrick
Previous: Jeff KingNext: Patrick Steinhardt
Message 9 of 48 in “ci: detect more warnings via `-Og`”
  1. 0/2 ci: detect more warnings via `-Og`Patrick Steinhardt, Jun 6, 2024
  2. 1/2 ci: fix check for Ubuntu 20.04Patrick Steinhardt, Jun 6, 2024
  3. Jeff KingJun 6, 2024
  4. Patrick SteinhardtJun 6, 2024
  5. 2/2 ci: let pedantic job compile with -OgPatrick Steinhardt, Jun 6, 2024
  6. Jeff KingJun 6, 2024
  7. Patrick SteinhardtJun 6, 2024
  8. Jeff KingJun 6, 2024
  9. Patrick SteinhardtJun 6, 2024
  10. 0/2 ci: detect more warnings via `-Og`Patrick Steinhardt, Jun 6, 2024
  11. 1/2 ci: fix check for Ubuntu 20.04Patrick Steinhardt, Jun 6, 2024
  12. 2/2 ci: compile "linux-gcc-default" job with -OgPatrick Steinhardt, Jun 6, 2024
  13. Justin ToblerJun 6, 2024
  14. Junio C HamanoJun 6, 2024
  15. Patrick SteinhardtJun 7, 2024
  16. Junio C HamanoJun 7, 2024
  17. Jeff KingJun 8, 2024
  18. Junio C HamanoJun 7, 2024
  19. Junio C HamanoJun 7, 2024
  20. 0/4 ci: detect more warnings via `-Og`Patrick Steinhardt, Jun 7, 2024
  21. 1/4 ci: fix check for Ubuntu 20.04Patrick Steinhardt, Jun 7, 2024
  22. 2/4 Makefile: add ability to append to CFLAGS and LDFLAGSPatrick Steinhardt, Jun 7, 2024
  23. Jeff KingJun 8, 2024
  24. Junio C HamanoJun 8, 2024
  25. Patrick SteinhardtJun 10, 2024
  26. 3/4 ci: compile code with V=1Patrick Steinhardt, Jun 7, 2024
  27. 4/4 ci: compile "linux-gcc-default" job with -OgPatrick Steinhardt, Jun 7, 2024
  28. Junio C HamanoJun 7, 2024
  29. Jeff KingJun 8, 2024
  30. Junio C HamanoJun 8, 2024
  31. Patrick SteinhardtJun 10, 2024
  32. Junio C HamanoJun 6, 2024
  33. Patrick SteinhardtJun 7, 2024
  34. Junio C HamanoJun 7, 2024
  35. 0/2 ci: detect more warnings via `-Og`Patrick Steinhardt, Jun 10, 2024
  36. 1/2 Makefile: add ability to append to CFLAGS and LDFLAGSPatrick Steinhardt, Jun 10, 2024
  37. 2/2 ci: compile "linux-gcc-default" job with -OgPatrick Steinhardt, Jun 10, 2024
  38. Junio C HamanoJun 10, 2024
  39. 1/2 DONTAPPLY: -Og fallout workaroundJunio C Hamano, Jun 10, 2024
  40. Junio C HamanoJun 10, 2024
  41. Patrick SteinhardtJun 11, 2024
  42. Junio C HamanoJun 11, 2024
  43. Patrick SteinhardtJun 12, 2024
  44. Patrick SteinhardtJun 12, 2024
  45. 2/2 DONTAPPLY: -Os fallout workaroundJunio C Hamano, Jun 10, 2024
  46. Junio C HamanoJun 12, 2024
  47. Jeff KingJun 13, 2024
  48. Junio C HamanoJun 13, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.