[Mono-dev] [PATCH] mono-basic version additions and fixes
kornelpal at gmail.com
Mon Feb 26 13:26:13 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), which
>is something I really would like to avoid (should be just checkout and load
>the solution in order to build with VS). I'd be ok with any workaround that
>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. People contributing to Mono should have
cygwin installed anyway and others can use source packages with Visual
Studio as well.
>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 new
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 entire
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
#ElseIf NET_VER = 1.1 Then
#ElseIf NET_VER = 2.0 Then
#If NET_VER >= 1.1 Then
Console.WriteLine("1.1 or higher")
#If NET_VER >= 1.1 AndAlso NET_VER < 2.0 Then
Console.WriteLine("should be 1.1 only")
More information about the Mono-devel-list