[MonoDevelop] Generics in CC

Matej Urbas matej.urbas at gmail.com
Mon Jul 3 16:47:57 EDT 2006


Hi

I've been away for a while, but here I am again.

While I'm still trying to make generics support for CC, I have not 
progressed very far. I have not been able to make the (de)serialization 
process work... I need some help from professionals here.

After changing the BaseTypes attribute into a ReturnTypeList (in 
AbstractClass), and after making all the changes needed in Persistent* 
classes, I have broken quite some things.

I have tested the changes on the Monodevelop project (Monodevelop.mds) - 
where I have manually deleted the .pidb files (I don't know if that's 
the right way of testing it either :D).


The problem I'm experiencing is that the serialization process doesn't 
work well (not at all). I'm getting a lot of these (when code completion 
is triggered in an editor):

ERROR MonoDevelop.Core.ILoggingService [(null)] - 
System.IndexOutOfRangeException: Array index is out of range.
in <0x0000e> MonoDevelop.Projects.Parser.StringNameTable:GetStringValue 
(Int32 id)
in <0x0003d> MonoDevelop.Projects.Parser.PersistentHelper:ReadString 
(System.IO.BinaryReader reader, INameDecoder nameTable)
in <0x0005b> MonoDevelop.Projects.Parser.PersistentReturnType:Read 
(System.IO.BinaryReader reader, INameDecoder nameTable)
in <0x00156> MonoDevelop.Projects.Parser.PersistentClass:Read 
(System.IO.BinaryReader reader, INameDecoder nameTable)
in <0x0009f> 
MonoDevelop.Projects.Parser.CodeCompletionDatabase:ReadClass 
(MonoDevelop.Projects.Parser.ClassEntry ce)
in <0x0005d> MonoDevelop.Projects.Parser.CodeCompletionDatabase:GetClass 
(MonoDevelop.Projects.Parser.ClassEntry ce)
in <0x0012f> MonoDevelop.Projects.Parser.CodeCompletionDatabase:GetClass 
(System.String typeName, Boolean caseSensitive)
in <0x000d7> MonoDevelop.Projects.Parser.ParserDatabase:GetClass 
(MonoDevelop.Projects.Parser.CodeCompletionDatabase db, System.String 
typeName, Boolean caseSensitive)
in <0x00035> MonoDevelop.Projects.Parser.ParserDatabase:GetClass 
(MonoDevelop.Projects.Parser.CodeCompletionDatabase db, System.String 
typeName, Boolean deepSearchReferences, Boolean caseSensitive)
in <0x00014> MonoDevelop.Projects.Parser.ParserDatabase:GetClass 
(MonoDevelop.Projects.Parser.CodeCompletionDatabase db, System.String 
typeName)
in <0x00066> MonoDevelop.Projects.Parser.ParserDatabase:SearchType 
(MonoDevelop.Projects.Parser.CodeCompletionDatabase db, System.String 
name, IClass callingClass, ICompilationUnit unit)
in <0x00020> 
MonoDevelop.Projects.Parser.ParserDatabase+CompilationUnitTypeResolver:Resolve 
(System.String typeName)
in <0x00059> MonoDevelop.Projects.Parser.PersistentReturnType:Resolve 
(IReturnType source, ITypeResolver typeResolver)
in <0x000be> MonoDevelop.Projects.Parser.PersistentProperty:Resolve 
(IProperty source, ITypeResolver typeResolver)
in <0x00607> MonoDevelop.Projects.Parser.PersistentClass:Resolve (IClass 
sclass, ITypeResolver typeResolver)
in <0x000b4> MonoDevelop.Projects.Parser.ParserDatabase:ResolveTypes 
(MonoDevelop.Projects.Project project, ICompilationUnit unit, 
MonoDevelop.Projects.Parser.ClassCollection types, 
MonoDevelop.Projects.Parser.ClassCollection result)
in <0x000e6> 
MonoDevelop.Projects.Parser.ProjectCodeCompletionDatabase:UpdateFromParseInfo 
(IParseInformation parserInfo, System.String fileName)
in <0x0016c> MonoDevelop.Projects.Parser.ParserDatabase:UpdateFile 
(MonoDevelop.Projects.Project project, System.String fileName, 
System.String fileContent)

It would be nice if anyone with experience could only examine my changes 
and point me into the right direction. I'm still trying to figure it out 
on my own, though ;)

The patches are attached, please take a look.

Bye
---
Matej Urbas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MonoDevelop-generic_support.patch
Type: text/x-patch
Size: 57851 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060703/0c0e47c0/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GenericParameter.cs
Type: text/x-csharp
Size: 4598 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060703/0c0e47c0/attachment-0005.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GenericParameterList.cs
Type: text/x-csharp
Size: 531 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060703/0c0e47c0/attachment-0006.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReturnTypeList.cs
Type: text/x-csharp
Size: 486 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/monodevelop-list/attachments/20060703/0c0e47c0/attachment-0007.bin 


More information about the Monodevelop-list mailing list