[#88925] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
4 messages
2018/09/09
[#88927] Re: [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical
— Eric Wong <normalperson@...>
2018/09/09
ko1@atdot.net wrote:
[#88926] [Ruby trunk Feature#15095] [PATCH] share VM stack between threads and fibers if identical — ko1@...
Issue #15095 has been updated by ko1 (Koichi Sasada).
3 messages
2018/09/09
[#89218] [Ruby trunk Bug#15130] open-uri hangs on cygwin — duerst@...
Issue #15130 has been updated by duerst (Martin D端rst).
5 messages
2018/09/30
[ruby-core:89154] [Ruby trunk Feature#15156] Have a 'c_headers' specifier in Gem::Specification.
From:
sameer.deshmukh93@...
Date:
2018-09-25 04:03:51 UTC
List:
ruby-core #89154
Issue #15156 has been reported by v0dro (Sameer Deshmukh).
----------------------------------------
Feature #15156: Have a 'c_headers' specifier in Gem::Specification.
https://bugs.ruby-lang.org/issues/15156
* Author: v0dro (Sameer Deshmukh)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Currently if one Ruby gem depends on the C extension of another Ruby gem, the only way
find the header of that gem is to run a `Gem::Specification.find_by_name` in the extconf.rb
of the gem needing the header and then adding the folder containing the header relative to
that path.
This approach is error-prone for three reasons:
+ It relies on the gem developer to do the hard work of finding out exactly where the needed
header file is located inside the sources of the gem.
+ It assumes that the location of header file will never change irrespective of gem releases.
+ The gem author then needs to re-dig the sources of the source gem to find where the header
is now located.
This is a considerable maintainence burden, especially given that there is no 'standard' way
of keeping public header files for C extensions of ruby gems.
I propose a new approach that will allow a gem developer to specify the path of the public
C header files in a new attribute within `Gem::Specification` in the gemspec of the source
gem. Thus, if someone wants to use the public headers of a gem, they can simply add the
following lines to their `extconf.rb`:
``` ruby
spec = Gem::Specification.find_by_name 'source-gem-name', 'source-gem-version'
find_header("source_gem.h", *spec.c_headers)
```
The way the source gem can specify the header file in their `source-gem-name.gemspec` can
be like so:
``` ruby
Gem::Specification.new do |spec|
# lots of other specs
spec.c_headers = ["path/to/headers/1", "path/to/headers/2"]
end
```
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>