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

Re: [PATCH 3/8] meson: improve summary of auto-detected features

From
Justin Tobler <jltobler@gmail.com>
Date
Jul 8, 2025, 19:56 UTC
Message-ID
<apzpu3ydbiyfxckqewqfsgjqm2kwpisj3gx4q5cb73ntsldxqy@vfzpgnu57rl6>
In-Reply-To
<20250703-b4-pks-meson-cleanups-v1-3-2804c2932abe@pks.im>
On 25/07/03 11:28AM, Patrick Steinhardt wrote:
Show 9 quoted lines
> The summary of auto-detected features prints a boolean for every option
> to tell the user whether or not the feature has been auto-enabled or
> not. This summary can be improved though, as in some cases this boolean
> is derived from a dependency. So if we pass in the dependency directly,
> then Meson knows to both print a boolean and, if the dependency was
> found, it also prints a version number.
> 
> Adapt the code accordingly and enable `bool_yn` so that actual booleans
> are formatted similarly to dependencies. Before this change:

Ok so without `bool_yn` enabled, only the dependencies listed directly would say YES/NO and not match the other entries.

Show 26 quoted lines
>   Auto-detected features
>     benchmarks      : true
>     curl            : true
>     expat           : true
>     gettext         : true
>     gitweb          : true
>     iconv           : true
>     pcre2           : true
>     perl            : true
>     python          : true
> 
> And after this change, we now see the version numbers as expected:
> 
>   Auto-detected features
>     benchmarks      : YES
>     curl            : YES 8.14.1
>     expat           : YES 2.7.1
>     gettext         : YES
>     gitweb          : YES
>     iconv           : YES
>     pcre2           : YES 10.44
>     perl            : YES
>     python          : YES
> 
> Note that this change also enables colorization of the boolean options,
> green for "YES" and red for "NO".

Ok, it looks like colorization it not an explicit option, but comes automatically with the `bool_yn` and dependency change. Nice.

Show 28 quoted lines
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  meson.build | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 4e41c3007bb..4f22d72641e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2193,15 +2193,15 @@ meson.add_dist_script(
>  
>  summary({
>    'benchmarks': get_option('tests') and perl.found() and time.found(),
> -  'curl': curl.found(),
> -  'expat': expat.found(),
> -  'gettext': intl.found(),
> +  'curl': curl,
> +  'expat': expat,
> +  'gettext': intl,
>    'gitweb': gitweb_option.allowed(),
> -  'iconv': iconv.found(),
> -  'pcre2': pcre2.found(),
> +  'iconv': iconv,
> +  'pcre2': pcre2,
>    'perl': perl_features_enabled,
>    'python': target_python.found(),
> -}, section: 'Auto-detected features')
> +}, section: 'Auto-detected features', bool_yn: true)
Looks good!
-Justin
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 7 of 46 in “A handful of Meson cleanups and improvements”
  1. 0/8 A handful of Meson cleanups and improvementsPatrick Steinhardt, Jul 3, 2025
  2. 1/8 meson: stop discovering native version of PythonPatrick Steinhardt, Jul 3, 2025
  3. Justin ToblerJul 8, 2025
  4. Patrick SteinhardtJul 9, 2025
  5. 2/8 meson: stop printing 'https' option twice in our summariesPatrick Steinhardt, Jul 3, 2025
  6. 3/8 meson: improve summary of auto-detected featuresPatrick Steinhardt, Jul 3, 2025
  7. Justin ToblerJul 8, 2025
  8. 4/8 meson: clean up unnecessary variablesPatrick Steinhardt, Jul 3, 2025
  9. 5/8 meson: fix lookup of shell on MINGW64Patrick Steinhardt, Jul 3, 2025
  10. 6/8 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=Patrick Steinhardt, Jul 3, 2025
  11. Ramsay JonesJul 3, 2025
  12. Patrick SteinhardtJul 8, 2025
  13. 7/8 meson: update subproject wrappersPatrick Steinhardt, Jul 3, 2025
  14. 8/8 ci: use Meson's new `--slice` optionPatrick Steinhardt, Jul 3, 2025
  15. Junio C HamanoJul 8, 2025
  16. Jeff KingJul 8, 2025
  17. Jeff KingJul 8, 2025
  18. Junio C HamanoJul 8, 2025
  19. Patrick SteinhardtJul 8, 2025
  20. 0/8 A handful of Meson cleanups and improvementsPatrick Steinhardt, Jul 8, 2025
  21. 1/8 meson: stop discovering native version of PythonPatrick Steinhardt, Jul 8, 2025
  22. 2/8 meson: stop printing 'https' option twice in our summariesPatrick Steinhardt, Jul 8, 2025
  23. 3/8 meson: improve summary of auto-detected featuresPatrick Steinhardt, Jul 8, 2025
  24. 4/8 meson: clean up unnecessary variablesPatrick Steinhardt, Jul 8, 2025
  25. 5/8 meson: fix lookup of shell on MINGW64Patrick Steinhardt, Jul 8, 2025
  26. Justin ToblerJul 8, 2025
  27. 6/8 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=Patrick Steinhardt, Jul 8, 2025
  28. 7/8 meson: update subproject wrappersPatrick Steinhardt, Jul 8, 2025
  29. 8/8 ci: use Meson's new `--slice` optionPatrick Steinhardt, Jul 8, 2025
  30. 0/8 A handful of Meson cleanups and improvementsPatrick Steinhardt, Jul 9, 2025
  31. 1/8 meson: stop discovering native version of PythonPatrick Steinhardt, Jul 9, 2025
  32. Junio C HamanoJul 9, 2025
  33. Justin ToblerJul 9, 2025
  34. Eli SchwartzJul 9, 2025
  35. Junio C HamanoJul 9, 2025
  36. 2/8 meson: stop printing 'https' option twice in our summariesPatrick Steinhardt, Jul 9, 2025
  37. Junio C HamanoJul 9, 2025
  38. 3/8 meson: improve summary of auto-detected featuresPatrick Steinhardt, Jul 9, 2025
  39. Toon ClaesJul 10, 2025
  40. Junio C HamanoJul 10, 2025
  41. 4/8 meson: clean up unnecessary variablesPatrick Steinhardt, Jul 9, 2025
  42. 5/8 meson: fix lookup of shell on MINGW64Patrick Steinhardt, Jul 9, 2025
  43. 6/8 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=Patrick Steinhardt, Jul 9, 2025
  44. 7/8 meson: update subproject wrappersPatrick Steinhardt, Jul 9, 2025
  45. 8/8 ci: use Meson's new `--slice` optionPatrick Steinhardt, Jul 9, 2025
  46. Justin ToblerJul 9, 2025

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.