Skip to content

Only require FFI on Windows - #132

Closed
DavidS wants to merge 1 commit into
enkessler:devfrom
DavidS:optional-ffi-dependency
Closed

DavidS wants to merge 1 commit into
enkessler:devfrom
DavidS:optional-ffi-dependency

Conversation

@DavidS

@DavidS DavidS commented Dec 20, 2017

Copy link
Copy Markdown
Contributor

This allows users to trade off between full-featured and
always-deployable by removing the hard dependency on a native extension.
The user of the gem needs to depend on FFI themselves to enable
posix_spawn on Linux.

@DavidS

DavidS commented Dec 20, 2017

Copy link
Copy Markdown
Contributor Author

This is an alternative implementation to #127

@coveralls

coveralls commented Dec 20, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 1be5200 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

coveralls commented Dec 21, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

8 similar comments
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-11.1%) to 79.58% when pulling 7bfaab8 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@DavidS
DavidS force-pushed the optional-ffi-dependency branch 2 times, most recently from 11f5a64 to a2e19c7 Compare January 5, 2018 15:19
This allows users to trade off between full-featured and
always-deployable by removing the hard dependency on a native extension.
The user of the gem needs to depend on FFI themselves to enable
`posix_spawn` on Linux.

For testing purposes, the Gemfile loads ffi if required by the environment.
@DavidS
DavidS force-pushed the optional-ffi-dependency branch from a2e19c7 to 99f279b Compare January 5, 2018 15:44
@DavidS

DavidS commented Jan 5, 2018

Copy link
Copy Markdown
Contributor Author

Hi @enkessler, apologies for the push spam, I relaized too late that I should have done that on a private branch before PR'ing.

Anyways, this should pass now, and make the FFI dependency optional on platforms that don't need it. This is much less invasive than #127, and still would fix my team's issues.

Happy New Year!

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 90.444% when pulling 11f5a64 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

1 similar comment
@coveralls

coveralls commented Jan 5, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 90.444% when pulling 11f5a64 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

coveralls commented Jan 5, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 90.444% when pulling a2e19c7 on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

coveralls commented Jan 6, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 90.444% when pulling 99f279b on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

2 similar comments
@coveralls

coveralls commented Jan 6, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 90.444% when pulling 99f279b on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@coveralls

coveralls commented Jan 6, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 90.444% when pulling 99f279b on DavidS:optional-ffi-dependency into ba46099 on enkessler:dev.

@enkessler

Copy link
Copy Markdown
Owner

@DavidS I'll take another look.

DavidS added a commit to DavidS/puppet-resource_api that referenced this pull request Jan 19, 2018
This means that for now the gem is not really usable on linux puppet
agents, but it'll work for development without special casing.

Final resolution of this is still in progress at enkessler/childprocess#132 and https://tickets.puppetlabs.com/browse/PDK-580
@sds sds mentioned this pull request Jan 3, 2019
@sds

sds commented Jan 12, 2019 •

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, @DavidS!

I made some minor adjustments in 576c249 given a few files have changed since this was first opened, but the tests all passed in Travis and AppVeyor.

Excited this will remove the ffi requirement by default. This has been merged onto master.

@sds sds closed this Jan 12, 2019
@sds sds mentioned this pull request Jan 12, 2019
@DavidS

DavidS commented Jan 14, 2019

Copy link
Copy Markdown
Contributor Author

Thanks a lot for picking this up @sds.

And a big thanks to @enkessler for stewardship. I know how hard OSS maintenance can be on the soul.

@sds sds mentioned this pull request Jan 25, 2019
sds added a commit that referenced this pull request Sep 19, 2019
We originally introduced this logic in #132 without understanding all
the implications.

Issue #158 raised a challenge with this approach.
sds added a commit that referenced this pull request Sep 20, 2019
We originally introduced this logic in #132 without understanding all
the implications.

Issue #158 raised a challenge with this approach.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 24, 2020
Update ruby-childprocessto 3.0.0.


### Version 3.0.0 / 2019-09-20

* [#156](enkessler/childprocess#156 unused `rubyforge_project` from gemspec
* [#160](enkessler/childprocess#160): Remove extension to conditionally install `ffi` gem on Windows platforms
* [#160](enkessler/childprocess#160): Remove runtime dependency on `rake` gem

### Version 2.0.0 / 2019-07-11

* [#148](enkessler/childprocess#148): Drop support for Ruby 2.0, 2.1, and 2.2
* [#149](enkessler/childprocess#149): Fix Unix fork reopen to be compatible with Ruby 2.6
* [#152](https://github.com/enkessler/childprocess/pull/152)/[#154](https://github.com/enkessler/childprocess/pull/154): Fix hangs and permission errors introduced in Ruby 2.6 for leader processes of process groups

### Version 1.0.1 / 2019-02-03

* [#143](enkessler/childprocess#144): Fix installs by adding `rake` gem as runtime dependency
* [#147](enkessler/childprocess#147): Relax `rake` gem constraint from `< 12` to `< 13`

### Version 1.0.0 / 2019-01-28

* [#134](enkessler/childprocess#134): Add support for non-ASCII characters on Windows
* [#132](enkessler/childprocess#132): Install `ffi` gem requirement on Windows only
* [#128](enkessler/childprocess#128): Convert environment variable values to strings when `posix_spawn` enabled
* [#141](enkessler/childprocess#141): Support JRuby on Java >= 9
msk pushed a commit to msk/pkgsrc that referenced this pull request May 11, 2026
Update ruby-childprocessto 3.0.0.


### Version 3.0.0 / 2019-09-20

* [NetBSD#156](enkessler/childprocess#156 unused `rubyforge_project` from gemspec
* [NetBSD#160](enkessler/childprocess#160): Remove extension to conditionally install `ffi` gem on Windows platforms
* [NetBSD#160](enkessler/childprocess#160): Remove runtime dependency on `rake` gem

### Version 2.0.0 / 2019-07-11

* [NetBSD#148](enkessler/childprocess#148): Drop support for Ruby 2.0, 2.1, and 2.2
* [NetBSD#149](enkessler/childprocess#149): Fix Unix fork reopen to be compatible with Ruby 2.6
* [NetBSD#152](https://github.com/enkessler/childprocess/pull/152)/[#154](https://github.com/enkessler/childprocess/pull/154): Fix hangs and permission errors introduced in Ruby 2.6 for leader processes of process groups

### Version 1.0.1 / 2019-02-03

* [NetBSD#143](enkessler/childprocess#144): Fix installs by adding `rake` gem as runtime dependency
* [NetBSD#147](enkessler/childprocess#147): Relax `rake` gem constraint from `< 12` to `< 13`

### Version 1.0.0 / 2019-01-28

* [NetBSD#134](enkessler/childprocess#134): Add support for non-ASCII characters on Windows
* [NetBSD#132](enkessler/childprocess#132): Install `ffi` gem requirement on Windows only
* [NetBSD#128](enkessler/childprocess#128): Convert environment variable values to strings when `posix_spawn` enabled
* [NetBSD#141](enkessler/childprocess#141): Support JRuby on Java >= 9
jperkin pushed a commit to TritonDataCenter/pkgsrc that referenced this pull request May 14, 2026
Update ruby-childprocessto 3.0.0.


### Version 3.0.0 / 2019-09-20

* [#156](enkessler/childprocess#156 unused `rubyforge_project` from gemspec
* [#160](enkessler/childprocess#160): Remove extension to conditionally install `ffi` gem on Windows platforms
* [#160](enkessler/childprocess#160): Remove runtime dependency on `rake` gem

### Version 2.0.0 / 2019-07-11

* [#148](enkessler/childprocess#148): Drop support for Ruby 2.0, 2.1, and 2.2
* [#149](enkessler/childprocess#149): Fix Unix fork reopen to be compatible with Ruby 2.6
* [#152](https://github.com/enkessler/childprocess/pull/152)/[#154](https://github.com/enkessler/childprocess/pull/154): Fix hangs and permission errors introduced in Ruby 2.6 for leader processes of process groups

### Version 1.0.1 / 2019-02-03

* [#143](enkessler/childprocess#144): Fix installs by adding `rake` gem as runtime dependency
* [#147](enkessler/childprocess#147): Relax `rake` gem constraint from `< 12` to `< 13`

### Version 1.0.0 / 2019-01-28

* [#134](enkessler/childprocess#134): Add support for non-ASCII characters on Windows
* [#132](enkessler/childprocess#132): Install `ffi` gem requirement on Windows only
* [#128](enkessler/childprocess#128): Convert environment variable values to strings when `posix_spawn` enabled
* [#141](enkessler/childprocess#141): Support JRuby on Java >= 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants