Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fall back for "type-name" for objects #836

Merged

Conversation

@EPashkin
Copy link
Member

EPashkin commented Sep 5, 2019

Fix #835

@mmstick Does this fix issue?

cc @GuillaumeGomez , @sdroege

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Sep 5, 2019

👍

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Sep 5, 2019

Is that a new version of gobject-introspection that only adds one instead of the other or what changed here? Are we sure it's always exactly what we want?

@EPashkin

This comment has been minimized.

Copy link
Member Author

EPashkin commented Sep 5, 2019

@sdroege Not sure why it not written, by code it was in too.
At minimum last schema says that "c:type" now optional while "glib:type-name" is not.
Maybe this function need be changed, or removed in favor or reading second

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Sep 5, 2019

Makes sense I guess

@EPashkin EPashkin force-pushed the EPashkin:fall_back_to_type_name_for_objects branch from c96c07f to 71f0d6e Sep 5, 2019
@EPashkin

This comment has been minimized.

Copy link
Member Author

EPashkin commented Sep 5, 2019

Checked schema:

  • Record doesn't have glib:type-name,
  • Union has both optional,
  • Bitfield and Enum have required c:type and optional glib:type-name.

So I only removed record changes, and all others still use read_object_c_type as it cover their cases.

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Sep 5, 2019

👍

@mmstick

This comment has been minimized.

Copy link

mmstick commented Sep 5, 2019

Seems to fix the issue. It no longer fails. I just get this now:

gir/target/bin/gir -c Gir.toml
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_get_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_get_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_authentication_agent_response_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_authentication_agent_response_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_check_authorization_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_check_authorization_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_enumerate_actions_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_enumerate_actions_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_enumerate_temporary_authorizations_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_enumerate_temporary_authorizations_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_register_authentication_agent_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_register_authentication_agent_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_register_authentication_agent_with_options_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_register_authentication_agent_with_options_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_revoke_temporary_authorization_by_id_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_revoke_temporary_authorization_by_id_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_revoke_temporary_authorizations_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_revoke_temporary_authorizations_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_unregister_authentication_agent_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_authority_unregister_authentication_agent_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_identity_from_string has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_permission_new_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_permission_new_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_subject_from_string has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_subject_exists_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_subject_exists_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_system_bus_name_get_process_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_system_bus_name_get_user_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_unix_group_new_for_name has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_unix_process_get_owner has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_unix_session_new_for_process_finish has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_unix_session_new_for_process_sync has unsupported outs
[2019-09-05T17:02:35Z WARN  libgir::analysis::functions] Function polkit_unix_user_new_for_name has unsupported outs
@EPashkin

This comment has been minimized.

Copy link
Member Author

EPashkin commented Sep 5, 2019

@mmstick Thanks for confirmation.
Unsupported out mostly for out arrays and pointers and currently can be written only manually.
I can't find correct issue (#596 and #594 IMHO is not about this) so can you fill issue with list of problem functions and links to your repos?
We have some of it too:
gdk_device_get_history, g_file_info_get_attribute_data, g_main_context_query, pango_layout_get_log_attrs, pango_tab_array_get_tabs, gtk_buildable_custom_tag_start

@EPashkin EPashkin merged commit 9e3cb65 into gtk-rs:master Sep 5, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@EPashkin EPashkin deleted the EPashkin:fall_back_to_type_name_for_objects branch Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.