[Mono-devel-list] Improved and fixed mcs /doc patch

Atsushi Eno atsushi at ximian.com
Fri Oct 15 18:20:28 EDT 2004


Hello,

Here I put the revised patch for mcs /doc support. It fixes
some problems raised by Marek (thanks!) and added warning
implementations. There are some changes made after the last
patch:

	- It now fills document info after DefineTypes().
	- It now checks <param> and <include> elements.
	- It now handles child enums and types in TypeContainer.

There are still remaining to-do tasks wrt this functionality:

	- comments on invalid language elements are not detected
	- cref resolution and check are not done

Tests are attached, but as for document comparison, not yet.

Comments are appreciated.

Here I reply to the latest comments from Marek;

* commented items

- 1. Error 2006 should be more explanatory.
	I wonder if I should really fix it. The message format is
	the same as other similar error formats.

- 2. test WarningLevel.
	fixed.

- 3. Use String.Format() instead of "+".
	Fixed.

> BTW: This code is really buggy. See point 6 for further hints and
> please be aware of FullName usage because it uses "+" instead of
> "." separator.

Right. Fixed. BTW, I could not use neither GetSignatureForError()
nor TypeBuilder.CSharpName() since it replaces some types with C#
keywords e.g. System.Int32 to int. I just replaced "+" with ".".

- 4. Use const for "M:" and "P:" and so on.
	Sure it might be desirable, but where do you put them?
	I grepped "const string" and got only 3 results.

- 5. "params" (ArrayParameter) causes incorrect method documentation.
	fixed.

- 6. Don't call FixupDocument() before defining types.
	It was just for performance wise. Originally it was almost
	the end of the compile. Now it is placed after DefineTypes().

> Why do not reuse bool Define () methods or DefineContainerMembers
> method where you can simply share a lot of code and don't traverse
> thought whole code tree.

If it is unsafe to handle documents before all DefineTypes() finish,
then reusing them still does not sound safe.


* Warnings and errors:

- 1569, 1570, 1571, 1572, 1573, 1589, 1590, 1592: done
- 1591: mostly done (method signature incomplete)
- 1574, 1580, 1581, 1584: not done (cref)
- 1587, 1588: a little done (comments on invalid language elements)

Thanks,
Atsushi Eno

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tests-20041015.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041016/745e7913/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tests-xml-20041015.zip
Type: application/x-zip-compressed
Size: 24413 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041016/745e7913/attachment.bin 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mcs-doc-20041015.diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041016/745e7913/attachment-0001.pl 


More information about the Mono-devel-list mailing list