[nem-en] Bugs in extension method implementation
Kamil Skalski
kamil.skalski at gmail.com
Sat Aug 26 21:02:33 CEST 2006
Hm, get following results trying to reproduce this from command line:
nazgul at mordor ~/nemerle/ncc/testsuite
$ ../../boot/ncc.exe -r ../out.stage3/Nemerle.Compiler.dll
../testsuite/t.n -greedy-
debug: loaded extension attribute from assembly Nemerle,
Version=0.9.3.26, Culture=neutral, PublicKeyToken=e080a9c724e2bfcd adn
type Nemerle.Internal.ExtensionAttribute
../testsuite/t.n:5:13:5:27: error: there is no member named `GetName'
in Nemerle.Compiler.IMember with type ?
nazgul at mordor ~/nemerle/ncc/testsuite
$ ../../boot/ncc.exe -r mscorlib -r ../out.stage3/Nemerle.dll -r
../out.stage3/Nemerle.Compiler.dll ../testsuite/t.n -no-stdlib
-greedy-
debug: loaded extension attribute from assembly Nemerle,
Version=0.9.3.24, Culture=neutral, PublicKeyToken=e080a9c724e2bfcd adn
type Nemerle.Internal.ExtensionAttribute
This is different from your results - your output looks like VS would
compile without "no-stdlib" flag. The strange thing is that I can't
see "-greedy-" flag in your output, but without it I get the error:
nazgul at mordor ~/nemerle/ncc/testsuite
$ ../../boot/ncc.exe -r mscorlib -r ../out.stage3/Nemerle.dll -r
../out.stage3/Nemerle.Compiler.dll ../testsuite/t.n -no-stdlib
debug: loaded extension attribute from assembly Nemerle,
Version=0.9.3.24, Culture=neutral, PublicKeyToken=e080a9c724e2bfcd adn
type Nemerle.Internal.ExtensionAttribute
error: internal compiler error: got some unknown exception of type
System.IO.FileLoadException: Could not load file or assembly 'Nemerle,
Version=0.9.3.24, Culture=neutral, PublicKeyToken=e080a9c724e2bfcd' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
2006/8/26, vc <vc at rsdn.ru>:
> > Indeed, it fails with current boot/ version, but it works correctly
> > with out.stage3/ before your commit.
>
> I not use boot/ncc.exe. I use compiled version of compiler. But I compile
> it using MSBuild (Nemerle.sln).
>
> > Well, this is strange, unless you compile using one compiler, but
> > referencing the other one, like:
> > boot/ncc.exe utility.n -r out.stage3/Nemerle.Compiler
>
> Probably it occurs because I compile a code from VS 2005.
>
> > Could you try again with the version before patch and tell me how
> > exactly do I reproduce this error?
>
> This is compilation log obtained from VS 2005.
> -----------------------------------------------------
> Target CoreCompile:
> C:\Program Files\Nemerle\ncc.exe /no-color /nowarn:1701,1702 /no-stdlib
> /define:DEBUG;TRACE /debug+
> /out:obj\Debug\Ext2.exe
> /target:exe Properties\AssemblyInfo.n Main.n
> /ref:"C:\Program Files\Nemerle\Nemerle.Compiler.dll"
> /ref:"C:\Program Files\Nemerle\Nemerle.dll"
> /ref:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
> /ref:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
> /ref:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
>
> D:\MyProjects\Tests\Nemerle\Ext2\Ext2\Main.n(5,14,5,28): error : there is
> no member named `GetName' in Nemerle.Compiler.IMember with type ?
> -----------------------------------------------------
> C:\Program Files\Nemerle\ contains compilers binaries r6576 (compiled
> from source, not boot).
>
> > I don't like the patch, since IsDefined against assembly loaded into
> > SystemTypeCache is the *correct* (and probably fastest) way to check
> > for attributes.
>
> In my option ExtensionAttribute not usual attribute. As to speed... I do
> not think, that it will affect performance. Not many of classes containing
> extension methods. Against a background of time of loading of metadata it's
> are nothing.
>
>
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list