[Mono-bugs] [Bug 77844][Wis] New - monodocs2html cannot find some files

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Mar 18 19:34:04 EST 2006


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 tapplek at gmail.com.

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

--- shadow/77844	2006-03-18 19:34:04.000000000 -0500
+++ shadow/77844.tmp.4386	2006-03-18 19:34:04.000000000 -0500
@@ -0,0 +1,81 @@
+Bug#: 77844
+Product: Mono: Doctools
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Console
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: tapplek at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: monodocs2html cannot find some files
+
+When running monodocs2html against the sources in svn, there were some
+entries in the index.xml file that were not actually documented. For
+instance, in
+svn://svn.myrealbox.com/source/trunk/monodoc/class/corlib/en/index.xml,
+there exist entries for System.__ComObject and
+System.Threading.CompressedStack, neither of which exist in the
+svn://svn.myrealbox.com/source/trunk/monodoc/class/corlib/en/ directory. 
+
+This mismatch confuses monodocs2html, and is exits with a
+System.IO.FileNotFoundException about the missing files. There are at least
+two solutions to this problem:
+
+1. fix the index.xml files to exactly corespond with the directory structure.
+
+2. fix monodocs2html to accept the existing index.xml, just like the
+assembler does
+
+I dislike solution 1, as it would cause any added files to also be added to
+the index.xml file. I think solution 2 is better, because that is how the
+assembler works. Thus I created a patch against
+svn://svn.myrealbox.com/source/trunk/monodoc/ to fix monodocs2html. It just
+wraps the html generator in an if(File.Exists()) block. Another solution
+would be a try ... catch (FileNotFoundException) block. I don't know which
+would be better, as I am new to C#. The patch is both inline and attached
+(made with svn diff):
+
+Index: tools/monodocs2html.cs
+===================================================================
+--- tools/monodocs2html.cs      (revision 58148)
++++ tools/monodocs2html.cs      (working copy)
+@@ -116,12 +116,18 @@
+                                if (opts.onlytype != null && !(nsname + "."
++ typename).StartsWith(opts.onlytype))
+                                        continue;
+ 
+-                               XmlDocument typexml = new XmlDocument();
+-                               typexml.Load(opts.source + "/" + nsname +
+"/" + typename + ".xml");
+-                               
+-                               Console.WriteLine(nsname + "." + typename);
+-                               
+-                               Generate(typexml, stylesheet, typeargs,
+opts.dest + "/" + nsname + "/" + typename + "." + opts.ext, template);
++                               string sourcefile = opts.source + "/" +
+nsname + "/" + typename + ".xml";
++
++                               if (System.IO.File.Exists(sourcefile)) {
++                                       string destfile = opts.dest + "/" +
+nsname + "/" + typename + "." + opts.ext;
++                                       
++                                       XmlDocument typexml = new
+XmlDocument();
++                                       typexml.Load(sourcefile);
++                                       
++                                       Console.WriteLine(nsname + "." +
+typename);
++                                       
++                                       Generate(typexml, stylesheet,
+typeargs, destfile, template);
++                               }
+                        }
+                }
+        }


More information about the mono-bugs mailing list