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

Generate futures variants of GIO async functions #582

Merged
merged 1 commit into from Apr 19, 2018

Conversation

Projects
None yet
3 participants
@sdroege
Member

sdroege commented Apr 18, 2018

@EPashkin If you have any suggestions how to make this less ugly, please tell me :)

This depends on gtk-rs/glib#314

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 18, 2018

Member

Example for what it generates is at gtk-rs/gio#108

Member

sdroege commented Apr 18, 2018

Example for what it generates is at gtk-rs/gio#108

extra_isa.push(" + IsA<glib::object::Object>");
}
if analysis.has_action_signals() {
extra_isa.push(" + glib::object::ObjectExt");
}
if has_async {
extra_isa.push(" + Clone + 'static");

This comment has been minimized.

@sdroege

sdroege Apr 18, 2018

Member

We should probably add these directly to the IsA trait. @GuillaumeGomez?

@sdroege

sdroege Apr 18, 2018

Member

We should probably add these directly to the IsA trait. @GuillaumeGomez?

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 18, 2018

Member

@sdroege Thanks.
Please rebase and squash on last master

Now many unused warnings in gio.
Seems analysis::Imports need map: BTreeMap<String, (Option<Version>, Option<String>)>,
to store features, maybe even Vec<String> if we plan adding other.

Member

EPashkin commented Apr 18, 2018

@sdroege Thanks.
Please rebase and squash on last master

Now many unused warnings in gio.
Seems analysis::Imports need map: BTreeMap<String, (Option<Version>, Option<String>)>,
to store features, maybe even Vec<String> if we plan adding other.

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 18, 2018

Member

Other affected crates: gtk, sourceview
Commented changes: gdk_pixbuf

Member

EPashkin commented Apr 18, 2018

Other affected crates: gtk, sourceview
Commented changes: gdk_pixbuf

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 19, 2018

Member

This will need some further changes now that @tmiasko's changes are merged.

@EPashkin does the approach look good to you otherwise? Any opinions on adding Clone + 'static bounds to IsA directly?

Member

sdroege commented Apr 19, 2018

This will need some further changes now that @tmiasko's changes are merged.

@EPashkin does the approach look good to you otherwise? Any opinions on adding Clone + 'static bounds to IsA directly?

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 19, 2018

Member

Currently results looks good, I don't see problem Clone + 'static currently.
So only last is problem cfg for imports

Member

EPashkin commented Apr 19, 2018

Currently results looks good, I don't see problem Clone + 'static currently.
So only last is problem cfg for imports

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 19, 2018

Member

All cleaned up, now have to do the imports part

Member

sdroege commented Apr 19, 2018

All cleaned up, now have to do the imports part

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 19, 2018

Member

Also done

Member

sdroege commented Apr 19, 2018

Also done

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 19, 2018

Member

On gio result is much better,
but in gtk it add use gio;use gio_ffi; to almost all generated file,
same problem in pango, pangocairo, glib, gdk-pixbuf, gdk, sourceview

Member

EPashkin commented Apr 19, 2018

On gio result is much better,
but in gtk it add use gio;use gio_ffi; to almost all generated file,
same problem in pango, pangocairo, glib, gdk-pixbuf, gdk, sourceview

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 19, 2018

Member

but in gtk it add use gio;use gio_ffi; to almost all generated file,

Oops. Should be better now

Member

sdroege commented Apr 19, 2018

but in gtk it add use gio;use gio_ffi; to almost all generated file,

Oops. Should be better now

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 19, 2018

Member

Yes, no stray use now, only small nit remain.

Member

EPashkin commented Apr 19, 2018

Yes, no stray use now, only small nit remain.

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Apr 19, 2018

Member

@sdroege Thanks.

Member

EPashkin commented Apr 19, 2018

@sdroege Thanks.

@EPashkin EPashkin merged commit ab462ea into gtk-rs:master Apr 19, 2018

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Apr 19, 2018

Member

Now just to regen all the crates :)

Member

sdroege commented Apr 19, 2018

Now just to regen all the crates :)

vhdirk pushed a commit to vhdirk/gir that referenced this pull request Jul 6, 2018

Merge pull request #582 from sdroege/futures
Generate futures variants of GIO async functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment