[Mono-devel-list] Patch for full-featured mcs /doc support

Atsushi Eno atsushi at ximian.com
Thu Dec 2 02:32:52 EST 2004


Hello,

Ian MacLean wrote:
> Cool - I've found a couple more :) It seems the type validation on cref
> items is too strict:
> 
> /// <summary>
> /// some summary
> /// </summary>
> /// <value>
> /// <see cref="System.Text.RegularExpressions"/>
> /// </value>
> public void foo2() {
> 
> }
> 
> /// <summary>
> /// Writes out a formatted string using the same semantics as
> /// <see cref="string.Format(string, object[])" />.
> /// </summary>
> /// <param name="line">The formatting string.</param>
> /// <param name="args">The object array to write into format string.</param>
> public void foo3(string line, params object[] args) {
> }
> }
> 
> gives:
> ianm at linux:~/dev> mcs -doc:foo.xml test-doc.cs
> fails-doc.cs(25) warning CS1574: XML comment on 'Class1.foo2()' has cref
> attribute 'System.Text.RegularExpressions' that could not be resolved in
> 'Class1'.


Oh, I even didn't know that there is "N:namespace" reference pattern
for cref attribute (I have been wondering if there is a formalized
reference of acceptable pattern for 'cref'). csc looks so buggy around
here though - that even allows "T:System.Text.RegularExpressions".

Now I fixed it in doc.cs.

> fails-doc.cs(35) warning CS1580: Invalid type for parameter '2' in XML
> comment cref attribute 'string.Format(string, object[])'
> Compilation succeeded - 2 warning(s)

Ok, I missed that Array types might happen there. Also, method name
generation needed more love for fixed parameters and array
parameters to coexist.

I've attached the fix. I changed nothing other than doc.cs, so I
just attach it. I put the full patch here:
http://primates.ximian.com/~atsushi/mcs-doc-patches/mcs-doc-20041202.diff

> maybe I should wait till you get this all committed to svn and then
> start logging these in bugzilla ?

No, let's fix all the problems before I check in the code, if any.
Please tell me if you found more problems. Thanks :-)

Atsushi Eno
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: doc.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041202/e7f2b8bc/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xml-030.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041202/e7f2b8bc/attachment-0001.pl 


More information about the Mono-devel-list mailing list