qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] po/meson: make i18n module optional
@ 2023-01-24  3:47 Anton Kochkov
  2023-01-24  7:20 ` Marc-André Lureau
  2023-01-24 11:30 ` Daniel P. Berrangé
  0 siblings, 2 replies; 4+ messages in thread
From: Anton Kochkov @ 2023-01-24  3:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anton Kochkov

This is necessary for Muon build system compatibility and
prevents the following error:

meson.build:4:8: error module 'i18n' is unimplemented,
  If you would like to make your build files portable to muon,
  use `import('i18n', required: false)`,
  and then check the .found() method before use.
  4 |   i18n.gettext(meson.project_name(),
             ^
qemu/meson.build:3640:3: error in function subdir()
3640 |   subdir('po')
         ^

Signed-off-by: Anton Kochkov <anton.kochkov@proton.me>
---
 po/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/po/meson.build b/po/meson.build
index a863f0575f..f7be95cf5f 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,4 +1,4 @@
-i18n = import('i18n')
+i18n = import('i18n', required: false)

 if find_program('xgettext', required: get_option('gettext')).found()
   i18n.gettext(meson.project_name(),
--
2.39.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] po/meson: make i18n module optional
  2023-01-24  3:47 [PATCH] po/meson: make i18n module optional Anton Kochkov
@ 2023-01-24  7:20 ` Marc-André Lureau
  2023-01-24 11:30 ` Daniel P. Berrangé
  1 sibling, 0 replies; 4+ messages in thread
From: Marc-André Lureau @ 2023-01-24  7:20 UTC (permalink / raw)
  To: Anton Kochkov; +Cc: qemu-devel

Hi

On Tue, Jan 24, 2023 at 7:48 AM Anton Kochkov <anton.kochkov@proton.me> wrote:
>
> This is necessary for Muon build system compatibility and
> prevents the following error:
>
> meson.build:4:8: error module 'i18n' is unimplemented,
>   If you would like to make your build files portable to muon,
>   use `import('i18n', required: false)`,
>   and then check the .found() method before use.
>   4 |   i18n.gettext(meson.project_name(),
>              ^
> qemu/meson.build:3640:3: error in function subdir()
> 3640 |   subdir('po')
>          ^
>
> Signed-off-by: Anton Kochkov <anton.kochkov@proton.me>
> ---
>  po/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/po/meson.build b/po/meson.build
> index a863f0575f..f7be95cf5f 100644
> --- a/po/meson.build
> +++ b/po/meson.build
> @@ -1,4 +1,4 @@
> -i18n = import('i18n')
> +i18n = import('i18n', required: false)

It should probably be "required: get_option('gettext')" instead,...

>
>  if find_program('xgettext', required: get_option('gettext')).found()
>    i18n.gettext(meson.project_name(),

..what if you move the import below here?

Fwiw, the i18n module is not the most complex. It may be a good idea
to try implementing it..

Impressive that muon can handle qemu though! I tried "configure
--meson=muon" but that didn't go far, how do you test it?

-- 
Marc-André Lureau


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] po/meson: make i18n module optional
  2023-01-24  3:47 [PATCH] po/meson: make i18n module optional Anton Kochkov
  2023-01-24  7:20 ` Marc-André Lureau
@ 2023-01-24 11:30 ` Daniel P. Berrangé
  2023-01-24 12:36   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel P. Berrangé @ 2023-01-24 11:30 UTC (permalink / raw)
  To: Anton Kochkov; +Cc: qemu-devel

On Tue, Jan 24, 2023 at 03:47:24AM +0000, Anton Kochkov wrote:
> This is necessary for Muon build system compatibility and
> prevents the following error:

This raises the question of whether we actually want Muon compatibility
in the first place though. IMHO one of the good benefits of Meson (and
all other modern build systems), is that application maintainers no
longer need to worry about portability between the many OS specific
re-implementations of 'make'. Personally I feel pretty unethusiastic
at the prospect of going back to that world by adding workarounds for
incomplete re-implementations of meson.

What is the compelling reason that users of QEMU need to use the
imcomplete Muon re-implementation, instead of sticking with official
Meson releases that QEMU maintainers actually test against on all
our targetted OS platforms ?

> meson.build:4:8: error module 'i18n' is unimplemented,
>   If you would like to make your build files portable to muon,
>   use `import('i18n', required: false)`,
>   and then check the .found() method before use.
>   4 |   i18n.gettext(meson.project_name(),
>              ^
> qemu/meson.build:3640:3: error in function subdir()
> 3640 |   subdir('po')
>          ^
> 
> Signed-off-by: Anton Kochkov <anton.kochkov@proton.me>
> ---
>  po/meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/po/meson.build b/po/meson.build
> index a863f0575f..f7be95cf5f 100644
> --- a/po/meson.build
> +++ b/po/meson.build
> @@ -1,4 +1,4 @@
> -i18n = import('i18n')
> +i18n = import('i18n', required: false)
> 
>  if find_program('xgettext', required: get_option('gettext')).found()
>    i18n.gettext(meson.project_name(),
> --
> 2.39.1
> 
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] po/meson: make i18n module optional
  2023-01-24 11:30 ` Daniel P. Berrangé
@ 2023-01-24 12:36   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-24 12:36 UTC (permalink / raw)
  To: Daniel P. Berrangé, Anton Kochkov; +Cc: qemu-devel

On 24/1/23 12:30, Daniel P. Berrangé wrote:
> On Tue, Jan 24, 2023 at 03:47:24AM +0000, Anton Kochkov wrote:
>> This is necessary for Muon build system compatibility and
>> prevents the following error:
> 
> This raises the question of whether we actually want Muon compatibility
> in the first place though. IMHO one of the good benefits of Meson (and
> all other modern build systems), is that application maintainers no
> longer need to worry about portability between the many OS specific
> re-implementations of 'make'. Personally I feel pretty unethusiastic
> at the prospect of going back to that world by adding workarounds for
> incomplete re-implementations of meson.
> 
> What is the compelling reason that users of QEMU need to use the
> imcomplete Muon re-implementation, instead of sticking with official
> Meson releases that QEMU maintainers actually test against on all
> our targetted OS platforms ?

Not really answered the point you raise, but a pair of commits seem
to prove Muon usefulness (by the QEMU maintainer who did the Meson
change!):

   commit eccae02d99dfcf32d5c5db76f59c8f6ba25b5cb0
   Author: Paolo Bonzini <pbonzini@redhat.com>
   Date:   Thu Jul 14 10:43:46 2022 +0200

       meson: remove dead code

       Found with "muon analyze".

   commit e3af71e9009de156665df67b9bdf5bc192aae215
   Author: Paolo Bonzini <pbonzini@redhat.com>
   Date:   Thu Jul 14 10:43:57 2022 +0200

       meson: remove dead assignments

       Found with "muon analyze".


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-24 12:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24  3:47 [PATCH] po/meson: make i18n module optional Anton Kochkov
2023-01-24  7:20 ` Marc-André Lureau
2023-01-24 11:30 ` Daniel P. Berrangé
2023-01-24 12:36   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).