Disable rlimit features on Windows#6492
Conversation
|
I am unsure if there's a ruby/spec to add for this, since typically ruby/spec does not specify when features should not be implemented. |
It's totally fine to add a ruby/spec for this, i.e. testing that |
|
Would be great if this fix was quickly released as a 9.2.14.1 or something like that. Because currently latest JRuby + Windows + latest Bundle results in ruby/rubygems#4129. |
|
@slonopotamus There will be a release of some sort but not until January. We are getting too close to the holiday season to do releases of stable JRuby versions. It sounds like @deivid-rodriguez will put out Bundler 2.2.1 with the fix for JRuby (among others) and I think that will solve this problem automatically. |
@eregon Thank you for clarifying... I will also add some specs. Past RubySpec policy was to avoid adding tests that "proved a negative". However if users can observe that a feature is implemented on some platforms and not implemented on others, it seems clear to me that we should have specifications for that behavior. |
We attempted to fake getrlimit behavior on Windows, but CRuby just leaves it and the related constants (plus setrlimit) unimplemented when the host platform does not support them. Our fake behavior led to ruby/rubygems#4129 which affects all versions of JRuby up through 9.2.14.0. This patch markes the related rlimit methods as not implemented and skips defining the related constants when on Windows. Fixes jruby#6491
This is checked by some libraries before attempting to use getrlimit/setrlimit and therefore is observable behavior that must be specified. See an example of how failure to specify this behavior led to a broken net-http-persistent on JRuby on Windows here: ruby/rubygems#4129
abca1b7 to
ee4325b
Compare
|
This is merged and there should be snapshots available soon at https://www.jruby.org/nightly |
See #6491 and ruby/rubygems#4129 for discussions of this issue.
We could also do this disabling when running on a platform that does not support our FFI, but that would increase the compatibility gap on such platforms.