Here's the diff between my trimmed version and the original: 
http://www.mergely.com/9E70e5Ls/
 
Hmm, I actually think that most of the removed methods don't matter (as they 
aren't called anyway). I just wanted to make the file only contain the code 
that is necessary.
The only "real" changes I had to make where accesses to internal fields in 
NumberFormatInfo, I just replaced them with accesses to the public properties 
that read them.
Maybe it makes more sense to correct those accesses directly in the 
referencesource, so we can reference it from there?
As a general guidance, when should we copy something to the Mono tree vs. 
editing referencesource? And if we copy, should we keep unneeded methods or 
remove them? 
 
-- Alex
 
From: mig...@xamarin.com
Date: Sat, 29 Nov 2014 10:40:10 -0500
Subject: Re: [Mono-dev] Porting System.Numerics from referencesource, 
approaches for copying code?
To: alex.koeplin...@outlook.com
CC: mono-devel-list@lists.ximian.com

Hey Alex,
In general, the approach works.
I am curious as to what is that you had to remove, and why.   Can you describe 
the needed changes?   (I saw the diff, but it is hard to tell what happened 
with it).
I thought that Numerics was pretty much standalone.
On Sat, Nov 29, 2014 at 10:32 AM, Alexander Köplinger 
<alex.koeplin...@outlook.com> wrote:



Hey, I've been trying to port System.Numerics (BigInteger, Complex classes) 
from referencesource to see and feel what the process looks like.
It mostly went fine, but there was one file (number.cs) I couldn't reference 
directly from the submodule and had to copy to the assembly folder in the Mono 
tree.
 
I had to remove a bunch of code from that file to trim it down to only what is 
needed for System.Numerics to compile (all the tests pass now as well).
Question: is this a valid approach or is there something better? Note that 
ifdefing the file wasn't feasible as it originally sits inside corlib and has 
many other unrelated methods in it.
 
Here's the commit with the WIP: 
https://github.com/akoeplinger/mono/commit/d7c461155a975a35f76b79ebcc3fe33407bd5dce
 
-- Alex
                                          

_______________________________________________

Mono-devel-list mailing list

Mono-devel-list@lists.ximian.com

http://lists.ximian.com/mailman/listinfo/mono-devel-list



                                          
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to