working with Mono Olive

37 views
Skip to first unread message

Jiri Moudry

unread,
May 13, 2008, 7:13:05 AM5/13/08
to DbLinq
FYI -
Pascal contacted Mono, and talked to Miguel and others about merging
projects.

Miguel's complaint was that DbLinq has hardcoded references to
internal things like "<>h__TransparentIdentifier1" and
"<>f__AnonymousType2", which are done differently on Mono.

Pablo from the Mono project just joined as a contributor here.
Me and Pascal have downloaded Mono ( I grabbed Olive 1.9.1) and will
work together to determine what needs to be done for full support.

Pascal Craponne

unread,
May 13, 2008, 8:08:39 AM5/13/08
to dbl...@googlegroups.com
Also, it is important to note that the standalone-DbLinq and DbLinq-in-Mono may have different goals:
- DbLinq-in-mono needs to stick as much as possible to Linq to SQL specifications
- Standalone DbLinq wants to offer more (bulk insert for example).

So ideally, we will build two different flavors. We'll see how to split the code files in order to allow this, probably using partial classes, with full inclusion for standalone DbLinq and a subset for Linq to SQL emulation.

I suggest we talk about this during this month, after the next release (0.17).

Jiri Moudry

unread,
May 13, 2008, 4:53:15 PM5/13/08
to DbLinq
Here is my first attempt at DbLinq compilation under Mono: (gmcs 1.9.1
on windows)

E:\prj\dblinq2007\DbLinq>gmcs -recurse:*.cs

.\Schema\Dbml\DbmlSchema.Adapter.cs(485,26): error CS0260: Missing
partial modifier on declaration of type `DbLinq.Schema.Dbml.Database'.
Another partial declaration of this type exists
.\Schema\Dbml.cs(64,18): (Location of the symbol related to previous
error)
.\Schema\Dbml\DbmlSchema.Adapter.cs(489,35): error CS0102: The type
`DbLinq.Schema.Dbml.Database' already contains a definition for
`Tables'
.\Schema\Dbml.cs(80,37): (Location of the symbol related to previous
error)
.\Schema\Dbml\DbmlSchema.Adapter.cs(492,38): error CS0102: The type
`DbLinq.Schema.Dbml.Database' already contains a definition for
`Functions'
.\Schema\Dbml.cs(83,40): (Location of the symbol related to previous
error)
.\Schema\Dbml\DbmlSchema.Adapter.cs(502,26): error CS0260: Missing
partial modifier on declaration of type `DbLinq.Schema.Dbml.Table'.
Another partial declaration of this type exists

... (and 50 similar errors)

For anyone trying also, here is the gmcs man page:
http://manpages.unixforum.co.uk/man-pages/linux/suse-linux-10.1/1/gmcs-man-page.html

Andrus Moor

unread,
May 14, 2008, 3:28:13 AM5/14/08
to dbl...@googlegroups.com
Maybe to compile in VCSE and only run under MONO for initial attempts.

Andrus.

Jiri Moudry

unread,
May 18, 2008, 4:58:55 PM5/18/08
to DbLinq
I have removed the duplicate file causing most of these compile
errors.

Next problem is that Mono 1.9.1 ships without System.Data.Linq.dll.
From this dll, we need things like [Table] and [Column] attributes,
lots of MetaAttribute classes, IExecuteResult etc.

But Andrus writes that it could be compiled from source:
http://groups.google.com/group/dblinq/browse_thread/thread/98b8f72a6e0d784a/a24b76f39ee68b2e?lnk=gst&q=mono#a24b76f39ee68b2e
so I asked Andrus to add this DLL to our project.

Let's see how much further we get.

Andrus Moor

unread,
May 19, 2008, 4:43:57 AM5/19/08
to dbl...@googlegroups.com
> Next problem is that Mono 1.9.1 ships without System.Data.Linq.dll.
> From this dll, we need things like [Table] and [Column] attributes,
> lots of MetaAttribute classes, IExecuteResult etc.
>
> But Andrus writes that it could be compiled from source:
> http://groups.google.com/group/dblinq/browse_thread/thread/98b8f72a6e0d784a/a24b76f39ee68b2e?lnk=gst&q=mono#a24b76f39ee68b2e
> so I asked Andrus to add this DLL to our project.

I looked into svn://anonsvn.mono-project.com/source/trunk/olive
I havent seen System.Data.Linq.dll source code in Olive SVN.
So I'm unable to create this dll.

My message was based on the commit log links (posted earlier in in list)
which show System.Data.Linq.dll source code commits.
Unfortunately I'm unable to find System.Data.Linq source code in MONO
repository.

I can get those source code commits and try to create System.Data.Linq based
on them. However I'm not sure is this reasonable.

Andrus.

Pascal Craponne

unread,
May 19, 2008, 4:51:46 AM5/19/08
to dbl...@googlegroups.com
This assembly is not in Olive, but in mcs project:
mcs/class/System.Data.Linq

Jiri Moudry

unread,
May 19, 2008, 8:34:51 AM5/19/08
to DbLinq
I am looking at the MCS project page:
http://www.mono-project.com/CSharp_Compiler
This page leads to various download pages.

Will see if one of these gives me the right DLL:
http://mono.ximian.com/monobuild/snapshot/sources-trunk/

Andrus Moor

unread,
May 19, 2008, 8:47:46 AM5/19/08
to dbl...@googlegroups.com
I created solution, compiled and committed System.Data.Linq.dll, .sln, and
.csproj files.

Project file has references to mono svn tree.

Andrus.

Andrus Moor

unread,
May 19, 2008, 9:04:36 AM5/19/08
to dbl...@googlegroups.com
> Will see if one of these gives me the right DLL:

Monocharge from

http://mono.ximian.com/daily/

contains pre-compiled System.Data.Linq.dll

Andrus.

Jiri Moudry

unread,
May 19, 2008, 3:46:59 PM5/19/08
to DbLinq
Monocharge contains an incomplete System.Dala.Linq.dll.
It is missing enum DataLoadOptions, and some classes have no bodies
yet:
DbLinq\Linq\Mapping\AttributedAbstractMetaDataMember.cs(74,36):
error CS0115:
'DbLinq.Linq.Mapping.AttributedAbstractMetaDataMember.LoadMethod':
no suitable method found to override
DbLinq\Linq\Mapping\AttributedMetaAssociation.cs(93,30): error
CS0115:
'DbLinq.Linq.Mapping.AttributedMetaAssociation.DeleteOnNull': no
suitable method found to override

Looks like we have to help with mono first.
This page talks about how to get source - but I not sure yet which
project I want to grab:
http://www.mono-project.com/AnonSVN

Jiri Moudry

unread,
May 19, 2008, 3:54:42 PM5/19/08
to DbLinq
Found the source svn address:
svn co svn://anonsvn.mono-project.com/source/trunk/mcs/class/System.Data.Linq

Who knows whom to send changes to, or how to contribute?

Jiri Moudry

unread,
May 19, 2008, 4:44:14 PM5/19/08
to DbLinq
Created a patch file for System.Data.Linq.dll, so DbLinq now compiles against mono DLLs.
(But cannot yet run).

Also, asked the Olive guys how to contribute this patch:
http://groups.google.com/group/mono-olive/browse_thread/thread/3f10aefe1f0f175f

system_data_linq_2008May19.patch

Miguel de Icaza

unread,
May 19, 2008, 6:14:32 PM5/19/08
to DbLinq
Hello,

> Also, it is important to note that the standalone-DbLinq and DbLinq-in-Mono
> may have different goals:
> - DbLinq-in-mono needs to stick as much as possible to Linq to SQL
> specifications
> - Standalone DbLinq wants to offer more (bulk insert for example).

Is DbLinq API-compatible with LINQ to SQL? I suspect its a different
API
in a different assembly.

If this is the case, I believe that there should not be two different
editions
of DBLinq, but that DBLinq should always be DBLinq on Windows or in
Mono.

Miguel.

Pascal Craponne

unread,
May 19, 2008, 6:38:35 PM5/19/08
to dbl...@googlegroups.com
If it is the same edition, how do you manage two APIs (one strict and the other extended)?
I started to write down my ideas on a wiki page to formalize a bit what we could do (this is a draft, not even a submission):
http://linq.to/db/SxSVersions

Jiri Moudry

unread,
May 20, 2008, 4:31:55 AM5/20/08
to DbLinq
Hi Miguel -my answer would be:

DbLinq is a reimplementation of System.Data.Linq.
- It is not complete yet (e.g. DataLoadOptions.LoadWith is not
implemented)
- It targets 5 database vendors (Oracle, PostgreSql,...), not just
two.
- It has a couple extra features not present in the MS implementation,
such as bulk insert support.

And as Pascal's page points out, to work with Mono, we would have to
change namespaces and choose a subset of the project.
Reply all
Reply to author
Forward
0 new messages