[Mono-bugs] [Bug 60439][Nor] Changed - mcs does not emit assembly qualified type name for types used in attributes

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 21 Jun 2004 16:33:04 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=60439

--- shadow/60439	2004-06-21 12:08:20.000000000 -0400
+++ shadow/60439.tmp.10595	2004-06-21 16:33:04.000000000 -0400
@@ -161,6 +161,45 @@
 not include the public key token of the attribute class in the assembly.
 
 ------- Additional Comments From sebastien@ximian.com  2004-06-21 12:08 -------
 Moved issue to runtime.
 
 MCS on the MS runtime does include the public key token in the assembly.
+
+------- Additional Comments From sebastien@ximian.com  2004-06-21 16:33 -------
+More informations...
+
+Managed-side (MCS)
+
+Stack trace (true for both runtime)
+1. Mono.CSharp.Driver.Main
+2. Mono.CSharp.Driver.MainDriver
+3. Mono.CSharp.RootContext.EmitCode
+4. Mono.CSharp.TypeContainer.Emit
+5. Mono.CSharp.Attributes.Emit
+6. Mono.CSharp.Attribute.Emit
+7. Mono.CSharp.Attribute.Resolve
+
+
+Managed-side (mono class library)
+
+1. public CustomAttributeBuilder (ConstructorInfo con, object[]
+constructorArgs)
+2. Initialize (...)
+3. GetBlob (...)
+
+The two arguments to the constructor are a System.String and a
+System.MonoType (which, "somehow", represents the
+System.Drawing.Design.UITypeEditor). MonoType seems to behave
+differently from RuntimeType.
+
+
+Runtime (mono)
+1. mono_reflection_get_custom_attrs_blob (...)
+2. encode_cattr_value (...)
+3. we switch in the case MONO_TYPE_CLASS
+4. str = type_get_qualified_name (((MonoReflectionType*)arg)->type, NULL);
+
+The runtime is able to find the MonoType internal informations (i.e.
+it's real type). The resulting string has the right class name,
+assembly name and version but doesn't have a public key token (so null
+is used).