qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: pbonzini@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] Compile time checks for newer glib
Date: Mon, 01 Jun 2015 14:01:23 -0400	[thread overview]
Message-ID: <556C9DF3.9080504@redhat.com> (raw)
In-Reply-To: <20150529160130.GC20215@work-vm>



On 05/29/2015 12:01 PM, Dr. David Alan Gilbert wrote:
> * Peter Maydell (peter.maydell@linaro.org) wrote:
>> On 29 May 2015 at 16:01, Dr. David Alan Gilbert (git)
>> <dgilbert@redhat.com> wrote:
>>> --- a/include/glib-compat.h
>>> +++ b/include/glib-compat.h
>>> @@ -16,6 +16,12 @@
>>>  #ifndef QEMU_GLIB_COMPAT_H
>>>  #define QEMU_GLIB_COMPAT_H
>>>
>>> +/*
>>> + * The source file including this compat header knows it's using newer glib
>>> + * functions than we generally allow, so don't warn about it.
>>> + */
>>> +#undef GLIB_VERSION_MIN_REQUIRED
>>> +#undef GLIB_VERSION_MAX_ALLOWED
>>>  #include <glib.h>
>>
>> ...but glib-compat.h is included by qemu-common.h and in general
>> the point is that code anywhere in QEMU can assume the compat
>> versions exist, so it feels like this will defeat the point.
> 
> Hmm, a lot of files seem to include glib.h directly.  But OK,
> so then Paolo is suggesting setting the minimum to 2.32
> which I can do, but then that wouldn't stop something that's
> in 2.22-2.32 but not in glib-compat.h
> 
> Dave
> 
>>
>> -- PMM
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
> 

When I bumped glib to 2.22, I played with using these macros and forcing
all files to include glib-compat and prohibiting direct includes of glib.

The problem is without a minimum version set to 2.3x, as you've stated,
the deprecated warnings will trigger for functions we added explicit
compat wrappers for, and I could think of no sane way to "forgive" these
usages as a one-time exception.

Perhaps -- /perhaps/ -- you could have a qemu-internal glib.h that sets
the version warnings and leave glib-compat alone without those includes,
but this seems like a setup that is inviting frustration for future devs.

--js

      reply	other threads:[~2015-06-01 18:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 15:01 [Qemu-devel] [PATCH 0/2] Use glib's checks for use of too-new functions Dr. David Alan Gilbert (git)
2015-05-29 15:01 ` [Qemu-devel] [PATCH 1/2] Fix glib_subprocess test Dr. David Alan Gilbert (git)
2015-05-29 15:01 ` [Qemu-devel] [PATCH 2/2] Compile time checks for newer glib Dr. David Alan Gilbert (git)
2015-05-29 15:37   ` Paolo Bonzini
2015-05-29 15:49     ` Dr. David Alan Gilbert
2015-05-29 15:53   ` Peter Maydell
2015-05-29 16:01     ` Dr. David Alan Gilbert
2015-06-01 18:01       ` John Snow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556C9DF3.9080504@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).