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

Add new types #125

Merged
merged 8 commits into from Jun 27, 2018

Conversation

Projects
None yet
3 participants
@GuillaumeGomez
Member

GuillaumeGomez commented Jun 19, 2018

impl Subprocess {
//#[cfg(any(feature = "v2_40", feature = "dox"))]
//pub fn new<'a, P: Into<Option<&'a Error>>>(flags: SubprocessFlags, error: P, argv0: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Subprocess {

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jun 19, 2018

Member

I have a crate that we could use to give VarArgs: https://crates.io/crates/va_list-rs (apparently, you can just give a va_list as a VarArgs argument so why not enjoying this?). Should we give it a try?

@GuillaumeGomez

GuillaumeGomez Jun 19, 2018

Member

I have a crate that we could use to give VarArgs: https://crates.io/crates/va_list-rs (apparently, you can just give a va_list as a VarArgs argument so why not enjoying this?). Should we give it a try?

This comment has been minimized.

@EPashkin

EPashkin Jun 19, 2018

Member

IMHO it worth to try but not in this PR (or if PR not merged until next release)

@EPashkin

EPashkin Jun 19, 2018

Member

IMHO it worth to try but not in this PR (or if PR not merged until next release)

This comment has been minimized.

@sdroege

sdroege Jun 19, 2018

Member

Also we discussed that a while ago on IRC and I believe there are some safety concerns there. Have to look again, I can't remember :)

@sdroege

sdroege Jun 19, 2018

Member

Also we discussed that a while ago on IRC and I believe there are some safety concerns there. Have to look again, I can't remember :)

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jun 19, 2018

Member

I don't intend to put it in this PR but since I had the chance to talk about it... 😛

@GuillaumeGomez

GuillaumeGomez Jun 19, 2018

Member

I don't intend to put it in this PR but since I had the chance to talk about it... 😛

This comment has been minimized.

@sdroege

sdroege Jun 19, 2018

Member

Also the newv variant is equivalent and more Rust-y :)

@sdroege

sdroege Jun 19, 2018

Member

Also the newv variant is equivalent and more Rust-y :)

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 19, 2018

Member

Looks generally good except for those comments above. Thanks for working on this :) This will become a good release for GIO!

Member

sdroege commented Jun 19, 2018

Looks generally good except for those comments above. Thanks for working on this :) This will become a good release for GIO!

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 19, 2018

Member

I hope it'll! I need to understand what's happening on the appveyor failure as well. Some duplicate implementations apparently...

Member

GuillaumeGomez commented Jun 19, 2018

I hope it'll! I need to understand what's happening on the appveyor failure as well. Some duplicate implementations apparently...

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 19, 2018

Member

Duplicate trait happened on travis too.
Only objects have buildin Eq (added long ago gtk-rs/glib@10745ad).
Not sure what we can do (IMHO ignoring equals remove generated Eq but it not rigth)

Member

EPashkin commented Jun 19, 2018

Duplicate trait happened on travis too.
Only objects have buildin Eq (added long ago gtk-rs/glib@10745ad).
Not sure what we can do (IMHO ignoring equals remove generated Eq but it not rigth)

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 19, 2018

Member

I'll test and we'll see. In worst case, I'll just copy/paste the whole file and ignore its generation...

Member

GuillaumeGomez commented Jun 19, 2018

I'll test and we'll see. In worst case, I'll just copy/paste the whole file and ignore its generation...

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 20, 2018

Member

The Eq thing is somewhat related to gtk-rs/glib#247

We need a way to opt-out of the automatic Eq, Debug, etc impls and have custom ones.

Member

sdroege commented Jun 20, 2018

The Eq thing is somewhat related to gtk-rs/glib#247

We need a way to opt-out of the automatic Eq, Debug, etc impls and have custom ones.

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 20, 2018

Member

I'll test and we'll see. In worst case, I'll just copy/paste the whole file and ignore its generation...

You can ignore the equal function in gir too probably. But it's all not a solution really :)

Member

sdroege commented Jun 20, 2018

I'll test and we'll see. In worst case, I'll just copy/paste the whole file and ignore its generation...

You can ignore the equal function in gir too probably. But it's all not a solution really :)

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 22, 2018

Member

Updated.

Member

GuillaumeGomez commented Jun 22, 2018

Updated.

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 23, 2018

Member

Okay, the safe version is now here!

Member

GuillaumeGomez commented Jun 23, 2018

Okay, the safe version is now here!

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 23, 2018

Member

After multiple windows fixes, does it seem good?

Member

GuillaumeGomez commented Jun 23, 2018

After multiple windows fixes, does it seem good?

@EPashkin EPashkin referenced this pull request Jun 23, 2018

Closed

Remove callback guard #126

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 23, 2018

Member

Travis don't think so 😭

Member

EPashkin commented Jun 23, 2018

Travis don't think so 😭

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 23, 2018

Member

By way, seems manual function in SubProcessLauncher is not_windows only, I can't find it in libgio-2.0-0.dll while g_subprocess_launcher_new is present

Member

EPashkin commented Jun 23, 2018

By way, seems manual function in SubProcessLauncher is not_windows only, I can't find it in libgio-2.0-0.dll while g_subprocess_launcher_new is present

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 23, 2018

Member

Another bug in gio I assume... I just switch to cfg(not(windows)) for SubProcessLauncher then?

Member

GuillaumeGomez commented Jun 23, 2018

Another bug in gio I assume... I just switch to cfg(not(windows)) for SubProcessLauncher then?

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 23, 2018

Member

It seem just is cfg(unix) as in header file

/* Extended I/O control, only available on UNIX */
#ifdef G_OS_UNIX
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_stdin_file_path       (GSubprocessLauncher   *self,
                                                                         const gchar           *path);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_stdin_fd             (GSubprocessLauncher   *self,
                                                                         gint                   fd);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_stdout_file_path      (GSubprocessLauncher   *self,
                                                                         const gchar           *path);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_stdout_fd            (GSubprocessLauncher   *self,
                                                                         gint                   fd);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_stderr_file_path      (GSubprocessLauncher   *self,
                                                                         const gchar           *path);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_stderr_fd            (GSubprocessLauncher   *self,
                                                                         gint                   fd);

GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_fd                   (GSubprocessLauncher   *self,
                                                                         gint                   source_fd,
                                                                         gint                   target_fd);

/* Child setup, only available on UNIX */
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_child_setup           (GSubprocessLauncher   *self,
                                                                         GSpawnChildSetupFunc   child_setup,
                                                                         gpointer               user_data,
                                                                         GDestroyNotify         destroy_notify);
#endif

Note that g_subprocess_launcher_set_xx_file_path with g_subprocess_launcher_set_child_setup is unix-only too.

Member

EPashkin commented Jun 23, 2018

It seem just is cfg(unix) as in header file

/* Extended I/O control, only available on UNIX */
#ifdef G_OS_UNIX
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_stdin_file_path       (GSubprocessLauncher   *self,
                                                                         const gchar           *path);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_stdin_fd             (GSubprocessLauncher   *self,
                                                                         gint                   fd);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_stdout_file_path      (GSubprocessLauncher   *self,
                                                                         const gchar           *path);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_stdout_fd            (GSubprocessLauncher   *self,
                                                                         gint                   fd);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_stderr_file_path      (GSubprocessLauncher   *self,
                                                                         const gchar           *path);
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_stderr_fd            (GSubprocessLauncher   *self,
                                                                         gint                   fd);

GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_take_fd                   (GSubprocessLauncher   *self,
                                                                         gint                   source_fd,
                                                                         gint                   target_fd);

/* Child setup, only available on UNIX */
GLIB_AVAILABLE_IN_2_40
void                    g_subprocess_launcher_set_child_setup           (GSubprocessLauncher   *self,
                                                                         GSpawnChildSetupFunc   child_setup,
                                                                         gpointer               user_data,
                                                                         GDestroyNotify         destroy_notify);
#endif

Note that g_subprocess_launcher_set_xx_file_path with g_subprocess_launcher_set_child_setup is unix-only too.

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez
Member

GuillaumeGomez commented Jun 23, 2018

Damn.

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 23, 2018

Member

Apart from the Windows stuff and the async function ownership problem this looks good to me now

Member

sdroege commented Jun 23, 2018

Apart from the Windows stuff and the async function ownership problem this looks good to me now

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 24, 2018

Member

Futures bug now in beta too :(
Also errors and warnings in stable https://travis-ci.org/gtk-rs/gio/jobs/395928392 IMHO legit and need fix

Member

EPashkin commented Jun 24, 2018

Futures bug now in beta too :(
Also errors and warnings in stable https://travis-ci.org/gtk-rs/gio/jobs/395928392 IMHO legit and need fix

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 24, 2018

Member

Also errors and warnings in stable https://travis-ci.org/gtk-rs/gio/jobs/395928392 IMHO legit and need fix

These are missing imports in the subprocess.rs in this PR (@GuillaumeGomez). And some type mismatches in there. All the other futures code seems to be fine.

Same for the beta problems.

Member

sdroege commented Jun 24, 2018

Also errors and warnings in stable https://travis-ci.org/gtk-rs/gio/jobs/395928392 IMHO legit and need fix

These are missing imports in the subprocess.rs in this PR (@GuillaumeGomez). And some type mismatches in there. All the other futures code seems to be fine.

Same for the beta problems.

Show outdated Hide outdated Gir.toml
Show outdated Hide outdated src/subprocess.rs
Show outdated Hide outdated src/subprocess.rs
@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 25, 2018

Member

Updated!

Member

GuillaumeGomez commented Jun 25, 2018

Updated!

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 26, 2018

Member

Looks good, thanks

Member

EPashkin commented Jun 26, 2018

Looks good, thanks

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 26, 2018

Member

Go for it then :)

Member

sdroege commented Jun 26, 2018

Go for it then :)

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 26, 2018

Member

I want to update following @EPashkin's comments first. Then I merge. :) Thanks a lot to both of you for your reviews!

Member

GuillaumeGomez commented Jun 26, 2018

I want to update following @EPashkin's comments first. Then I merge. :) Thanks a lot to both of you for your reviews!

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 27, 2018

Member

for futures all v0.2.* yanked

Member

EPashkin commented Jun 27, 2018

for futures all v0.2.* yanked

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 27, 2018

Member

for futures all v0.2.* yanked

Great! Complained about that here, let's see what they reply https://users.rust-lang.org/t/futures-0-2-has-been-moved-to-futures-preview/18329/2?u=slomo

Member

sdroege commented Jun 27, 2018

for futures all v0.2.* yanked

Great! Complained about that here, let's see what they reply https://users.rust-lang.org/t/futures-0-2-has-been-moved-to-futures-preview/18329/2?u=slomo

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 27, 2018

Member

Maybe only needs moving to the futures-preview crates instead, I'll check later

Member

sdroege commented Jun 27, 2018

Maybe only needs moving to the futures-preview crates instead, I'll check later

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 27, 2018

Member

I fixed conditions.

Member

GuillaumeGomez commented Jun 27, 2018

I fixed conditions.

@sdroege

This comment has been minimized.

Show comment
Hide comment
@sdroege

sdroege Jun 27, 2018

Member

Currently preparing gio-futures PR, then this can be merged IMHO

Member

sdroege commented Jun 27, 2018

Currently preparing gio-futures PR, then this can be merged IMHO

@GuillaumeGomez GuillaumeGomez merged commit a4eee77 into gtk-rs:master Jun 27, 2018

0 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build failed
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:new-types2 branch Jun 27, 2018

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 27, 2018

Member

@GuillaumeGomez Docs on windows failed
https://ci.appveyor.com/project/GuillaumeGomez/gio/build/job/ujoevof6anec5ur7

error: string literal with a suffix is invalid
  --> src\subprocess_launcher.rs:12:9
   |
12 | #[doc = "Replacement for "real" [`IntoRawFd`] trait for non-unix targets.
   |         ^^^^^^^^^^^^^^^^^^^^^^
error: unexpected token: `" [`IntoRawFd`] trait for non-unix targets.
[`IntoRawFd`]: https://doc.rust-lang.org/std/os/unix/io/trait.IntoRawFd.html"`
  --> src\subprocess_launcher.rs:12:31
   |
12 |   #[doc = "Replacement for "real" [`IntoRawFd`] trait for non-unix targets.
   |  _______________________________^
13 | |
14 | | [`IntoRawFd`]: https://doc.rust-lang.org/std/os/unix/io/trait.IntoRawFd.html"]
   | |_____________________________________________________________________________^ unexpected token after this
error: Could not document `gio`.

Member

EPashkin commented Jun 27, 2018

@GuillaumeGomez Docs on windows failed
https://ci.appveyor.com/project/GuillaumeGomez/gio/build/job/ujoevof6anec5ur7

error: string literal with a suffix is invalid
  --> src\subprocess_launcher.rs:12:9
   |
12 | #[doc = "Replacement for "real" [`IntoRawFd`] trait for non-unix targets.
   |         ^^^^^^^^^^^^^^^^^^^^^^
error: unexpected token: `" [`IntoRawFd`] trait for non-unix targets.
[`IntoRawFd`]: https://doc.rust-lang.org/std/os/unix/io/trait.IntoRawFd.html"`
  --> src\subprocess_launcher.rs:12:31
   |
12 |   #[doc = "Replacement for "real" [`IntoRawFd`] trait for non-unix targets.
   |  _______________________________^
13 | |
14 | | [`IntoRawFd`]: https://doc.rust-lang.org/std/os/unix/io/trait.IntoRawFd.html"]
   | |_____________________________________________________________________________^ unexpected token after this
error: Could not document `gio`.

@EPashkin

This comment has been minimized.

Show comment
Hide comment
@EPashkin

EPashkin Jun 27, 2018

Member

.. and doc comments will be not accepted anyway it need be added to lgpl-docs

Member

EPashkin commented Jun 27, 2018

.. and doc comments will be not accepted anyway it need be added to lgpl-docs

@GuillaumeGomez

This comment has been minimized.

Show comment
Hide comment
@GuillaumeGomez

GuillaumeGomez Jun 27, 2018

Member

This is really annoying. :-/ I'll open a PR to remove it from here.

Member

GuillaumeGomez commented Jun 27, 2018

This is really annoying. :-/ I'll open a PR to remove it from here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment