-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fix #143 - Childprocess v1.0.0 failing to install. #144
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module ChildProcess | ||
VERSION = '1.0.0' | ||
VERSION = '1.0.1' | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this eliminates the situation where installation is broken when rake is missing.
But it also propagates
rake
as a runtime dependency of any app that includeschildprocess
and returns any app that useschildprocess
on any platform to a state whererake
is always available at runtime. For users who are concerned about the surface area of their applications for security or performance reasons, this is less than desirable.Since we have a known workaround (pin to 0.9.x), I advocate for taking the time to find a solution that doesn't add runtime dependencies that aren't actually necessary at runtime, or at least reduces the effect to platforms on which they are needed for the installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change came from a desire to not have
ffi
be a dependency. So...it's kind of a 'pick your poison' situation. Between the two, I'd guess that more places are fine havingrake
installed thanffi
. If there is yet another solution that doesn't require either gem as a mandatory dependency, then that would be even better.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@enkessler If a conditional dependency (ffi on Windows) is all you want, you can remove
ext/mkrf_conf.rb
and do a conditional instead inchildprocess.gemspec
:With this you don't need rake at runtime. As you pointed out, that generated Rakefile has no use at the moment.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@farkasmate conditionals in the gemspec don't quite work in this case, because they are evaluated at
gem build
, before the gem is uploaded to rubygems.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked at alternative extensions we could implement, but the introduction of
rake
as a dependency is the only way to do this in a platform-agnostic way. Other extensions require the existence ofmake
or other tools, which may not be installed on some systems.For this reason, and given the fact that
rake
is usually (but not always) installed by default on Ruby systems, it seems reasonable to add a dependency onrake
for sake of removing theffi
dependency for all non-Windows systems.