[#22684] [Bug #1247] YAML::load converts some dates into strings — Matthew Wilson <redmine@...>

Bug #1247: YAML::load converts some dates into strings

10 messages 2009/03/05

[#22725] [Bug #1253] Fix MSVC Build Issues — Charlie Savage <redmine@...>

Bug #1253: Fix MSVC Build Issues

13 messages 2009/03/07

[#22727] Moving ruby 1.9.1 forward on windows — Charlie Savage <cfis@...>

Hi everyone,

14 messages 2009/03/08

[#22731] [Bug #1255] += for large strings egrigiously slow — James Lee <redmine@...>

Bug #1255: += for large strings egrigiously slow

11 messages 2009/03/08

[#22736] Ruby 1.9.1 and tail recursion optimization — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Moin, moin!

13 messages 2009/03/08
[#22739] Re: Ruby 1.9.1 and tail recursion optimization — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...> 2009/03/08

Wolfgang N疆asi-Donner schrieb:

[#22748] [Feature #1256] Add constant TAILRECURSION to let a program recognize if tail recursion optimization is implemented — Wolfgang Nádasi-Donner <redmine@...>

Feature #1256: Add constant TAILRECURSION to let a program recognize if tail recursion optimization is implemented

7 messages 2009/03/08

[#22803] Relegate 1.8.6 to Engine Yard, part II — Urabe Shyouhei <shyouhei@...>

Hello and sorry for my being slow for this issue. It's OK now for me to pass

21 messages 2009/03/10

[#22812] [Bug #1261] cross-compiling Ruby extensions using mkmf doesn't fully respect DESTDIR — Daniel Golle <redmine@...>

Bug #1261: cross-compiling Ruby extensions using mkmf doesn't fully respect DESTDIR

8 messages 2009/03/10

[#22892] Ruby Time — valodzka <valodzka@...>

Got tired of current ruby Time limitation, I have written this -

24 messages 2009/03/14
[#22949] Re: Ruby Time — Tanaka Akira <akr@...> 2009/03/19

In article <9e19ed87-9d12-4f98-af3c-bd49a71b0bd4@p11g2000yqe.googlegroups.com>,

[#22974] Re: Ruby Time — valodzka <valodzka@...> 2009/03/20

[#22977] Re: Ruby Time — Urabe Shyouhei <shyouhei@...> 2009/03/20

valodzka wrote:

[#22981] Re: Ruby Time — valodzka <valodzka@...> 2009/03/21

> I bet you'll get tired of updating that database. There's a major difference

[#22893] [Feature #1291] O_CLOEXEC flag missing for Kernel::open — David Martin <redmine@...>

Feature #1291: O_CLOEXEC flag missing for Kernel::open

10 messages 2009/03/15

[#22939] [Bug #1303] A name considered a local variable on RHS of an assignment that defines it — Tomas Matousek <redmine@...>

Bug #1303: A name considered a local variable on RHS of an assignment that defines it

8 messages 2009/03/19

[#23063] [Bug #1332] Reading file on Windows is 500x slower then with previous Ruby version — Damjan Rems <redmine@...>

Bug #1332: Reading file on Windows is 500x slower then with previous Ruby version

11 messages 2009/03/30

[#23075] [Bug #1336] Change in string representation of Floats — Brian Ford <redmine@...>

Bug #1336: Change in string representation of Floats

37 messages 2009/03/31
[#23179] [Bug #1336] Change in string representation of Floats — Roger Pack <redmine@...> 2009/04/11

Issue #1336 has been updated by Roger Pack.

[#23181] Re: [Bug #1336] Change in string representation of Floats — Brent Roman <brent@...> 2009/04/11

[#23186] Re: [Bug #1336] Change in string representation of Floats — Yukihiro Matsumoto <matz@...> 2009/04/12

Hi,

[#23187] Re: [Bug #1336] Change in string representation of Floats — Brent Roman <brent@...> 2009/04/13

[#23188] Re: [Bug #1336] Change in string representation of Floats — Yukihiro Matsumoto <matz@...> 2009/04/13

Hi,

[ruby-core:22727] Moving ruby 1.9.1 forward on windows

From: Charlie Savage <cfis@...>
Date: 2009-03-08 00:01:09 UTC
List: ruby-core #22727
Hi everyone,

In consultation with Luis and Roger, I'd like to discuss moving Ruby 
1.9.1 forward on Windows.  We have some concrete proposals that will 
require changes to the way Ruby is built on Windows as well as changes 
to rubygems.  First though, let me lay out our assumptions:

1.  The average windows user does not have a C compiler installed and 
isn't necessarily all that interested in getting one.

2.  Because of #1, extensions for windows should be packaged as binary 
gems (same as now)

3.  Ruby itself will likely be built by mingw32 (since the one click 
installer is headed that way), but msvc builds should also be expected 
and supported.

4.  Ruby extensions will be built with msvc (multiple versions), 
mingw+msys or cross-compiled.


Proposals
==========

Based on these assumptions, we propose the following changes (and will 
be happy to provide patches if the community can come to a consensus):


1.  Ruby library name

Proposal: The ruby runtime dll on Windows should *always* be named 
ruby19.dll.  Currently it includes the runtime library name 
(msvcrt-ruby19.dll for example).

Benefit: Having 1 runtime library name means gem developers only have to 
create 1 binary for windows, not 1 for msvc builds, and 1 for mingw 
builds.  This allows extension developers to use their toolchain of choice.


2.  rubygems platform

Proposal:  The ruby platform should not be differ for msvc and mingw (so 
no more mswin32-60 and mingw). We propose that the ruby gems platform 
for windows is always:

<architecture>-<os>-<ruby version>

Examples:

x86-mswin-19
x86_64-mswin-19

Benefit: This change will allow developers to create binary gems using 
their toolchain of choice (msvc, mingw/msys, cross-compile) and have it 
work against ruby built with either msvc or mings/msys.

Adding the ruby-version will allow rubygems to distinguish between 
binary gems built for ruby 1.8 versus 1.9 (which are clearly 
incompatible).  Perhaps rubygems already has a mechanism for this - I 
didn't see one in my research but could have missed it?


Mixing runtime libraries
========================

The most obvious criticism of this plan is that it will lead to mixing 
of microsoft runtime c libraries.  From my experience this works as long 
as extension developers follow the rules described here:

http://msdn.microsoft.com/en-us/library/ms235460(VS.80).aspx

To be more concrete, this boils down to two simple rules:

* If you call ALLOC or ALLOC_N, use xfree and not free
* Don't call sprintf or printf in an extension, instead use 
rb_f_sprintf/rb_vsprintf/rb_io_printf

If an extension violate these two rules then its obvious, a segmentation 
fault happens.  Thus these bugs are easy to find and easy to fix.

Since VC6 is thankfully no longer available, supporting msvc absolutely, 
positively requires mixing c runtime libraries and therefore extension 
writers must follow these two simple rules.  We don't view this as a 
particularly difficult burden, especially in light of the changes 
extension developers already frequently have to make for 1.9.1 
compatibility.


Conclusion
==========

* Fixing the ruby runtime library name is a 1 line patch which we'll be 
happy to provide
* Updating the rubygems platform is easy enough, but we assume deeper 
changes would have to be made for rubygems to download the correct gem 
binary.  We're happy to put together a patch if this seems like the 
right way forward.

Anyone have questions, objections, or better ideas?

Thanks,

Charlie



-- 
Charlie Savage
http://cfis.savagexi.com

Attachments (1)

smime.p7s (3.16 KB, application/x-pkcs7-signature)

In This Thread

Prev Next