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

Re: [PATCH v3 6/6] Makefile: build "$(FUZZ_OBJS)" in CI, not under "all"

From
Jeff King <peff@peff.net>
Date
Mar 1, 2021, 09:39 UTC
Message-ID
<YDy2WMMg4asR8E4B@coredump.intra.peff.net>
In-Reply-To
<87wnusj6gt.fsf@evledraar.gmail.com>
On Sun, Feb 28, 2021 at 09:13:54PM +0100, Ævar Arnfjörð Bjarmason wrote:
Show 31 quoted lines
> > The current state is that regular devs are responsible for avoiding
> > compile breakages in the fuzz objects, even if they don't care
> > themselves. Your earlier patches turned this into: regular devs are not
> > on the hook for breaking fuzz objects; they are the responsibility of
> > fuzz people. I'm OK with either of those, but this approach seems to me
> > like the worst of both worlds. ;)
> >
> > If you do a refactor, you are still on the hook for breaking the fuzz
> > objects because CI will fail (and you have to investigate it, and fix it
> > for CI to remain a useful tool). But instead of finding out about the
> > problem quickly as you're working, instead you push up what you think is
> > a finished result, and then from minutes to hours later you get a
> > notification telling you that oops, you missed a spot. I find that the
> > shorter the error-fix-compile cycle is, the less time I waste waiting or
> > context-switching.
> >
> > If we had a ton of fuzz object files that took forever to build, the
> > savings on each build might be worth it. But AFAICT (from timing "make
> > clean; make -j1" before and after), we are saving less than 1% of the
> > build time (which is way less than the run-to-run noise).
> >
> > It doesn't seem like the right tradeoff to me. (Likewise, if other
> > CI-only checks we have, like coccinelle, could be run at a similar cost,
> > I'd recommend sticking them into the default developer build).
> 
> It's mainly psychological and doesn't contribute much to overall build
> time as a percentage, but I find it grating that the last thing I see
> before I switch away from that terminal when firing off a build on a
> slower GCC farm box I can only use -j1 on, is these fuzz objects taking
> 2-3 seconds to build, knowing I'm wasting time on something I'll never
> need.

Sure, I find it annoying, too. And I am totally fine with saying "nope, let them bitrot if nobody cares enough about them to build". That is after all what happens with a bunch of stuff in compat/, or custom code like NO_PTHREADS, or with/without pcre, curl, etc.

This just seems like a bad middle ground.
Show 7 quoted lines
> I think when we build something we should narrowly be compiling only the
> things we need, not running some sort of pseudo-CI on every developer's
> computer. We can have CI or other targets for that.
> 
> Besides, if we were going for some sane cost-benefit here we'd have
> targets to try compiling with NO_CURL=1 or some other conditional setups
> that are actually common in the wild.

Right. So that mostly just argues to me for not compiling them ever unless they are needed. I.e., dropping the CI part of your patch.

Show 9 quoted lines
> > One thing we _could_ do is stop building fuzz objects as part of "all",
> > but include them for DEVELOPER=1 builds (which includes CI). That keeps
> > them from hurting normal users (who don't actually need them), but
> > prevents bitrot. It doesn't address your original motivation though (you
> > as a developer would probably still be building them).
> 
> Please no. A very good thing about how DEVELOPER=1 works is that we're
> not doing anything extra except advisory compilation flags. It's turned
> on for "production" builds in a lot of settings because of that.

I'm not convinced that we should limit the DEVELOPER flag for this reason in general. The point of the flag is to add extra linting, including stopping the build if need be. If that is in tension with somebody using it for production builds, I would always choose improving the developer experience.

That said, I don't at all care about linting the fuzz code, so I don't think it's a very compelling case.

-Peff
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 28 of 39 in “Makefile: micro-optimize light non-test builds”
  1. 0/4 Makefile: micro-optimize light non-test buildsÆvar Arnfjörð Bjarmason, Jan 26, 2021
  2. 1/4 Makefile: refactor assignment for subsequent changeÆvar Arnfjörð Bjarmason, Jan 26, 2021
  3. Junio C HamanoJan 27, 2021
  4. 3/4 Makefile: add a NO_TEST_TOOLS flagÆvar Arnfjörð Bjarmason, Jan 26, 2021
  5. 4/4 Makefile: add a NO_{INSTALL_,}SCRIPT_FALLBACKS targetÆvar Arnfjörð Bjarmason, Jan 26, 2021
  6. 2/4 Makefile: refactor for subsequent changeÆvar Arnfjörð Bjarmason, Jan 26, 2021
  7. Jeff KingJan 26, 2021
  8. Junio C HamanoJan 27, 2021
  9. Jeff KingJan 27, 2021
  10. Junio C HamanoJan 27, 2021
  11. 0/6 Makefile: add {program,xdiff,test,git}-objs & objects targetsÆvar Arnfjörð Bjarmason, Jan 28, 2021
  12. 0/6 Makefile: add {program,xdiff,test,git}-objs & objects targetsÆvar Arnfjörð Bjarmason, Feb 1, 2021
  13. Junio C HamanoFeb 3, 2021
  14. Jeff KingFeb 4, 2021
  15. Junio C HamanoFeb 4, 2021
  16. 0/6 Makefile: add {program,xdiff,test,git,fuzz}-objs & objects targetsÆvar Arnfjörð Bjarmason, Feb 23, 2021
  17. Junio C HamanoFeb 23, 2021
  18. Jeff KingFeb 23, 2021
  19. 1/6 Makefile: guard against TEST_OBJS in the environmentÆvar Arnfjörð Bjarmason, Feb 23, 2021
  20. 2/6 Makefile: split up long OBJECTS lineÆvar Arnfjörð Bjarmason, Feb 23, 2021
  21. 4/6 Makefile: split OBJECTS into OBJECTS and GIT_OBJSÆvar Arnfjörð Bjarmason, Feb 23, 2021
  22. 3/6 Makefile: sort OBJECTS assignment for subsequent changeÆvar Arnfjörð Bjarmason, Feb 23, 2021
  23. 5/6 Makefile: add {program,xdiff,test,git,fuzz}-objs & objects targetsÆvar Arnfjörð Bjarmason, Feb 23, 2021
  24. 6/6 Makefile: build "$(FUZZ_OBJS)" in CI, not under "all"Ævar Arnfjörð Bjarmason, Feb 23, 2021
  25. Jeff KingFeb 23, 2021
  26. Junio C HamanoFeb 23, 2021
  27. Ævar Arnfjörð BjarmasonFeb 28, 2021
  28. Jeff KingMar 1, 2021
  29. 1/6 Makefile: remove "all" on "$(FUZZ_OBJS)"Ævar Arnfjörð Bjarmason, Feb 1, 2021
  30. Jeff KingFeb 4, 2021
  31. 3/6 Makefile: split up long OBJECTS lineÆvar Arnfjörð Bjarmason, Feb 1, 2021
  32. 2/6 Makefile: guard against TEST_OBJS in the environmentÆvar Arnfjörð Bjarmason, Feb 1, 2021
  33. 4/6 Makefile: sort OBJECTS assignment for subsequent changeÆvar Arnfjörð Bjarmason, Feb 1, 2021
  34. 6/6 Makefile: add {program,xdiff,test,git}-objs & objects targetsÆvar Arnfjörð Bjarmason, Feb 1, 2021
  35. Junio C HamanoFeb 1, 2021
  36. 5/6 Makefile: split OBJECTS into OBJECTS and GIT_OBJSÆvar Arnfjörð Bjarmason, Feb 1, 2021
  37. 1/6 Makefile: remove "all" on "$(FUZZ_OBJS)"Ævar Arnfjörð Bjarmason, Jan 28, 2021
  38. 2/6 Makefile: guard against TEST_OBJS in the environmentÆvar Arnfjörð Bjarmason, Jan 28, 2021
  39. Junio C HamanoJan 29, 2021

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.