[Mono-dev] [PATCH] mono-basic version additions and fixes

Rolf Bjarne Kvinge rolflists at ya.com
Mon Feb 26 14:38:16 EST 2007

>>>The attached patch add a Consts.vb file similar to Consts.cs in mcs tree.
>>>Version numbers are moved to there.
>>>I think that using the package version in vbnc is better so this patch
>>modifies that as well.
>>>Note that I was unable to build vbnc using the Makefiles so I don't know 
>>this patch breaks building vbnc using Makefiles.
>>>Please review and approve the patch.
>>A couple of comments:
>>The way I see it with this patch you'll introduce a cygwin dependency on
>>windows (since in order to build you'll have to run configure first),
>>is something I really would like to avoid (should be just checkout and
>>the solution in order to build with VS). I'd be ok with any workaround
>>fixes this problem (for instance: a default Consts.vb file might be there,
>>if the user runs configure, the version info is updated, otherwise the
>>default is used.
>Source packages (ie. releases and daily snapshots) will include Consts.vb. 
>As I see mono-basic already depends on these tools so I don't think I'm 
>introducing unwanted dependencies. 
Mono-basic doesn't depend on anything but a vb compiler for the moment, and
I'd like to keep it that way.

>People contributing to Mono should have cygwin installed anyway and others 
>can use source packages with Visual Studio as well.
I don't and I will not go through the pain it is to install it unless I
really have to.

>>You're defining both NET_1_1 and NET_2_0 for v2.0 compilation, this seems
>>somewhat backwards to me, since I think the constants are telling me which
>>version I want to compile, not which features should be enabled.
>This is the same for C# sorces. Note that there is ONLY_1_1 as well that it

>redundant because #if NET_1_1 && !NET_2_0 could be used so I don't like 
>that. The rationale behind retaining old version directives is that if a
>version is introduced you don't have to update all the old #if lines with 
>the new version to include all previous features.
>Unlike C# Visual Basic supports value in #Const so if it's OK for the
>mono-basic tree I support switching to a NET_VER constant that contains the

>version number like this:
>#Const NET_VER = 1.1
>#If NET_VER = 1.0 Then
>    Console.WriteLine("1.0")
>#ElseIf NET_VER = 1.1 Then
>    Console.WriteLine("1.1")
>#ElseIf NET_VER = 2.0 Then
>    Console.WriteLine("2.0")
>    Console.WriteLine("unknown")
>#End If
>#If NET_VER >= 1.1 Then
>    Console.WriteLine("1.1 or higher")
>#End If
>#If NET_VER >= 1.1 AndAlso NET_VER < 2.0 Then
>    Console.WriteLine("should be 1.1 only")
>#End If
This looks like a great idea!


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.4/702 - Release Date: 25/02/2007

More information about the Mono-devel-list mailing list