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

Re: [PATCH 0/11] renaming argv_array

From
Jeff King <peff@peff.net>
Date
Aug 12, 2020, 15:06 UTC
Message-ID
<20200812150611.GA33189@coredump.intra.peff.net>
In-Reply-To
<82991f30-fe37-d6d2-ffd5-8b0878f46c83@web.de>
On Tue, Aug 11, 2020 at 06:08:22PM +0200, René Scharfe wrote:
Show 13 quoted lines
> > This has bugged me for a while, so I decided to finally fix it. It
> > wasn't _too_ painful, though I'm sure there will be a little fallout
> > with topics in flight.
> 
> Just as this landed in master now, https://lobste.rs/ decided to link to
> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2493.pdf, which is a
> paper about reserved identifiers in C.  It contains a nice overview.
> 
> Anyway, 7.31 of C11 says: "All external names described below are
> reserved no matter what headers are included by the program."  And
> 7.31.13 goes on: "Function names that begin with str, mem, or wcs and a
> lowercase letter may be added to the declarations in the <string.h>
> header."  So the names of the strvec functions are reserved.

It was the same in C99. I think this is one of those cases where we need to worry less about what the standard says and more about what the real world does. As long as we're ready for C25 or whatever to add "strvec" and we accept that we'll need to change the name then, I'm not particularly concerned. A compiler that starts warning about "str" functions in the meantime would be impractical I think (forget strbuf, stuff like strip_extension() would be illegal).

Show 5 quoted lines
> Also how about using Coccinelle and patience to reduce the impact of
> such a change next time?  I.e. adding the new thing, providing a
> semantic patch for converting old code, waiting a reasonable amount of
> time after the last conversion was necessary and then removing the
> old thing.
So I almost sent a rant about Coccinelle along with this series. :)

Debian unstable now ships coccinelle 1.0.8, and it's unbelievably slow compared to 1.0.4. Running "make coccicheck" is currently at 80 minutes of CPU time running each script in parallel, with none of them down. They're also all consuming 6GB of RAM each, so I'm killing them all.

I got somewhere similar when I was working on this series, got fed up, and then just did the whole thing with grep, which was easier. I'm open to the idea that a slower transition might have helped topics in flight catch up, but it also would have prolonged the pain. So I dunno.

-Peff
Previous: Johannes SchindelinNext: Jeff King
Message 41 of 46 in “renaming argv_array”
  1. 0/11 renaming argv_arrayJeff King, Jul 28, 2020
  2. 01/11 argv-array: use size_t for count and allocJeff King, Jul 28, 2020
  3. 02/11 argv-array: rename to strvecJeff King, Jul 28, 2020
  4. 03/11 strvec: rename files from argv-array to strvecJeff King, Jul 28, 2020
  5. 04/11 quote: rename sq_dequote_to_argv_array to mention strvecJeff King, Jul 28, 2020
  6. 05/11 strvec: convert builtin/ callers away from argv_array nameJeff King, Jul 28, 2020
  7. 06/11 strvec: convert more callers away from argv_array nameJeff King, Jul 28, 2020
  8. 07/11 strvec: convert remaining callers away from argv_array nameJeff King, Jul 28, 2020
  9. 08/11 strvec: fix indentation in renamed callsJeff King, Jul 28, 2020
  10. Jacob KellerJul 28, 2020
  11. Junio C HamanoJul 28, 2020
  12. 09/11 strvec: update documention to avoid argv_arrayJeff King, Jul 28, 2020
  13. 10/11 strvec: drop argv_array compatibility layerJeff King, Jul 28, 2020
  14. Junio C HamanoJul 28, 2020
  15. Jeff KingJul 29, 2020
  16. Jeff KingJul 29, 2020
  17. Jeff KingJul 29, 2020
  18. Junio C HamanoJul 29, 2020
  19. Derrick StoleeJul 29, 2020
  20. Junio C HamanoJul 29, 2020
  21. Jeff KingJul 29, 2020
  22. 11/11 strvec: rename struct fieldsJeff King, Jul 28, 2020
  23. Junio C HamanoJul 28, 2020
  24. Junio C HamanoJul 28, 2020
  25. Christian CouderJul 29, 2020
  26. Jeff KingJul 29, 2020
  27. Junio C HamanoJul 29, 2020
  28. Jeff KingJul 28, 2020
  29. Jacob KellerJul 28, 2020
  30. Jeff KingJul 29, 2020
  31. Christian CouderJul 29, 2020
  32. Christian CouderJul 29, 2020
  33. Eric SunshineJul 29, 2020
  34. Jeff KingJul 29, 2020
  35. René ScharfeAug 11, 2020
  36. Taylor BlauAug 11, 2020
  37. Junio C HamanoAug 11, 2020
  38. Jacob KellerAug 11, 2020
  39. Junio C HamanoAug 11, 2020
  40. Johannes SchindelinAug 12, 2020
  41. Jeff KingAug 12, 2020
  42. Jeff KingAug 12, 2020
  43. René ScharfeAug 12, 2020
  44. Jeff KingAug 12, 2020
  45. René ScharfeAug 12, 2020
  46. Jeff KingAug 12, 2020

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.