[Ironruby-core] [patch] building Microsoft.Scripting.Metadata on Mono

Tomas Matousek Tomas.Matousek at microsoft.com
Wed Jul 21 12:08:58 EDT 2010

Thanks, I'll fix it.

BTW: The code is based on CCI2 PE reader (http://ccimetadata.codeplex.com).


-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jb Evain
Sent: Wednesday, July 21, 2010 2:02 AM
To: ironruby-core at rubyforge.org
Subject: [Ironruby-core] [patch] building Microsoft.Scripting.Metadata on Mono


Microsoft.Scripting.Metadata is being built with warnaserror, but it contains a couple of issues that are not detected by csc, but that are by dmcs, crashing the build. Here's a fix:

diff --git a/Runtime/Microsoft.Scripting.Metadata/MemoryMapping.V2.cs
index ddb9387..7ed9bd5 100644
--- a/Runtime/Microsoft.Scripting.Metadata/MemoryMapping.V2.cs
+++ b/Runtime/Microsoft.Scripting.Metadata/MemoryMapping.V2.cs
@@ -108,7 +108,6 @@ namespace Microsoft.Scripting.Metadata {
             int size;
             int fileDescriptor = 0;
             MemoryMapping mapping = null;
-            IntPtr ptr = IntPtr.Zero;

             // make sure we don't get interrupted before we save the handle and the pointer:
diff --git a/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
index 22655c5..17c375a 100644
--- a/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
+++ b/Runtime/Microsoft.Scripting.Metadata/MetadataImport.cs
@@ -1100,7 +1100,6 @@ namespace Microsoft.Scripting.Metadata {
         #region Dump
 #if DEBUG
         public unsafe void Dump(TextWriter output) {
-            IntPtr imageStart = (IntPtr)_image.Pointer;
             output.WriteLine("  {0}", _image.Length);

Those variables aren't used, triggering warnings, that are turned into errors.

And geez, looking at the code, you guys should have used cecil/light ;)

Jb Evain  <jb at nurv.fr>
Ironruby-core mailing list
Ironruby-core at rubyforge.org

More information about the Ironruby-core mailing list