Bug#492854: [libmono-system2.0-cil] The LINQ-provided ThenBy() method is not stable

2008-07-29 Thread Emanuele Aina
Package: libmono-system2.0-cil
Version: 1.9.1+dfsg-2
Severity: normal

Using the ThenBy() method provided by System.Linq to do a stable sort of
an enumerable already ordered with OrderBy() does not give the expected
result, as the primary ordering is ignored.

Here is a testcase:

==
// Test the ThenBy() linq method in mono
// Compile with 'gmcs -r:System.Core MonoThenByTest.cs'

using System;
using System.Linq;

class MonoThenByTest {
public static void Main (string[] args)
{
string[] unsorted = new [] { a1, b1, a2, c2, c1};

// order on the whole string
string[] sorted = unsorted
.OrderBy(s = s)
.ToArray();

// order on the first char and then on the second
// it should give the same result as 'sorted'
string[] test = unsorted
.OrderBy(s = s[0])
.ThenBy(s = s[1])
.ToArray();

// these should be all equal
for(int i=0; isorted.Length; i++) {
if (sorted[i] == test[i])
Console.WriteLine({0} == {1}, sorted[i], test[i]);
else
Console.WriteLine({0} != {1}, sorted[i], test[i]);
}
}
}
==

While the results should be equal, here it gives:

a1 == a1
a2 != b1
b1 != c1
c1 != c2
c2 != a2


Thank you!


--- System information. ---
Architecture: amd64
Kernel:   Linux 2.6.25-2-amd64

Debian Release: lenny/sid
  500 unstableftp.it.debian.org 
  500 testing security.debian.org 

--- Package information. ---
Depends(Version) | Installed
-+-=
libc6(= 2.7-1)  | 2.7-12
 OR libc6.1  (= 2.7-1)  | 
 OR libc0.1   (= 2.7-1) | 
libcups2  (= 1.3.7) | 1.3.8-1
libmono-corlib2.0-cil   (= 1.2.2.1) | 1.9.1+dfsg-2
libmono-security2.0-cil (= 1.9) | 1.9.1+dfsg-2
libmono0  (= 1.2.6) | 1.9.1+dfsg-2
mono-jit  (= 1.9.1) | 1.9.1+dfsg-2
mono-jit  ( 1.9.2) | 1.9.1+dfsg-2


-- 
Emanuele Aina
http://initd.org




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#492854: [libmono-system2.0-cil] The LINQ-provided ThenBy() method is not stable

2008-07-29 Thread Jo Shields
On Tue, 2008-07-29 at 14:35 +0200, Emanuele Aina wrote:
 Package: libmono-system2.0-cil
 Version: 1.9.1+dfsg-2
 Severity: normal
 
 Using the ThenBy() method provided by System.Linq to do a stable sort of
 an enumerable already ordered with OrderBy() does not give the expected
 result, as the primary ordering is ignored.

This doesn't appear to be a Debian-specific bug, so please pass the
information upstream to the Novell bugzilla. It'll be much easier to get
the bug fixed if you communicate directly with the Mono developers,
rather than the Debian Mono packaging team acting as middle-men




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#492854: [libmono-system2.0-cil] The LINQ-provided ThenBy() method is not stable

2008-07-29 Thread Emanuele Aina
Jo Shields reindirizzò:

 This doesn't appear to be a Debian-specific bug, so please pass the
 information upstream to the Novell bugzilla. It'll be much easier to get
 the bug fixed if you communicate directly with the Mono developers,
 rather than the Debian Mono packaging team acting as middle-men

I've had the chance to test the SVN version of mono (r109173) and the
bug seems fixed.

I think that when mono 2.0 enters in Debian this could be closed.

Thank you and sorry for the noise.




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]