JoshCheek / seeing_is_believing

Displays the results of every line of code in your file
1.3k stars 54 forks source link

Getting WARN -- : posix_spawn is not yet supported on x86_64-cygwin (x86_64-cygwin), falling back to default implementation. #160

Closed bolandross closed 3 years ago

bolandross commented 3 years ago

I am using Ruby 2.6.4p104 on a Windows 10 computer with Cygwin.

After having installed the _seeing_isbelieving gem, I am now able to run the command from the command line, but the output always contains this warning:

WARN -- : posix_spawn is not yet supported on x86_64-cygwin (x86_64-cygwin), falling back to default implementation. If you believe this is an error, please file a bug at http://github.com/enkessler/childprocess/issues

Is there a command line argument that I can use to suppress this?

JoshCheek commented 3 years ago

There's not :(

I opened an issue on ChildProcess: https://github.com/enkessler/childprocess/issues/176

Locally I did this, which worked for me:

image

I'm not sure what to do in the long-run. I think, ideally I would be able to use Ruby's builtin spawn method, but I'm not sure it can handle all the things I need from it (I haven't looked into it recently). This is how I'm currently using it: https://github.com/JoshCheek/seeing_is_believing/blob/46d49a53a68ec22edd52322ad0f1192ef2d77f51/lib/seeing_is_believing/evaluate_by_moving_files.rb#L81-L149

These are the tests it would need to pass:

image
JoshCheek commented 3 years ago

I was thinking about this some more, and my answer above may have not been exactly what you were asking. If all you want to do is to suppress warning, then you can probably do this:

ruby -W0 -S seeing_is_believing ...

🤔 that could be difficult though, if you're using an editor integration, because it may not give you the ability to configure that. Maybe instead use the RUBYOPT env var, set it to -W0 and then Ruby should turn warnings off when running SiB.

image
bolandross commented 3 years ago

Hey and thanks for getting back to this.

Since I am using seeing_is_believing as a vim-plugin (and additionally not being very experienced with any of these involved components) I took a crowbar approach and removed the warning line from the childprocess source file in the gems directory 😅 as soon as I'll have a bit more time to spare, I'll try some more experimenting for a more elegant solution.

JoshCheek commented 3 years ago

This isn't released yet, but I've locally got it working... except for on Windows 😅 Hoping to release it soon, though.