Is the G_PARAM_DEPRECATED flag deprecated? Shall it be ignored?

The new GtkApplication:support-save property is marked G_PARAM_DEPRECATED in the call to g_param_spec_boolean(). It’s not marked Deprecated in the description, which is reasonable since it’s new.

It’s quite common that properties are marked Deprecated in the description without getting the G_PARAM_DEPRECATED flag in the call to g_param_spec_*(). But I don’t think I’ve seen the opposite before (G_PARAM_DEPRECATED but not Deprecated).

GObject-introspection seems to ignore the G_PARAM_DEPRECATED flag when it creates GIR files. Is that the right thing to do in all situations?

Well of course it’s a GTK bug. You should use them both together, not one or the other.

As for what gobject-introspection should do about it, I don’t have a strong opinion. I suppose failing with an error would be ideal, but that would make it harder to build older software versions.

G_PARAM_DEPRECATED is used for the diagnostic warning at run time; for deprecation annotations in the introspection data, only the Deprecated tag in the doc blocks tied to the property is considered, as that includes the version and a message.

In this particular case, the GtkApplication:support-save property is marked as deprecated because the support for save/restore functionality is still a work in progress.

Adrian says he’s planning to remove this property (so it should never reach a stable release).

Well… not remove entirely but certainly rework at the very least.

Anyway, the flag being there in the first place is a copy+paste error on my part. I haven’t bothered fixing it since I am currently reworking the API, but it’s on my list of “things to make sure we fix”

I suggest not spending much time on the GTK save/restore API at the moment.