[CSHARP-4] Linq Driver Broken Under Mono. Created: 17/Feb/10 Updated: 20/Oct/10 Resolved: 20/Oct/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | SAMUS |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sam Corder | Assignee: | Sam Corder |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mono 2.4.3 Ubuntu 9.10 |
||
| Description |
|
The linq tests don't pass under Mono 2.4.3 as shipped with Ubuntu 9.10 and others. |
| Comments |
| Comment by Steve Wagner [ 20/Oct/10 ] |
|
Migrated to GitHub http://github.com/mongodb-csharp/mongodb-csharp/issues/issue/8 |
| Comment by Doug Mayer [ 26/Apr/10 ] |
|
I won't have access to try this out for a few days, but the old MongoDB LINQ provider expected the .NET-specific exception message of "Sequence contains no elements" from the LINQ implementation. At the time, Mono didn't have an error message, though it looks like the trunk now uses "The source sequence is empty" (http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/System.Core/System.Linq/Enumerable.cs line 834). If the MongoDB LINQ provider fixes this it probably needs to find a way other than exception messages, or allow for a MONO directive (though if they change it between versions, that will end up being a headache). |
| Comment by Craig Wilson [ 26/Apr/10 ] |
|
It may be pertinent to try this issue with the new Linq provider. Can you attach some code to reproduce the bug so we can try it with the new linq provider? |
| Comment by Doug Mayer [ 03/Mar/10 ] |
|
This looks like a bug in Mono. They don't specify the message when they throw this exception in their LINQ implementation, so the test fails. You can see this around line 590 of http://anonsvn.mono-project.com/viewvc/tags/mono-2-4-3/mcs/class/System.Core/System.Linq/Enumerable.cs What's the recommended course of action on this? Do we want to only check for an InvalidOperationException, or do we want to introduce Mono-only directives into the codebase? |