I am interested in contributing something to mono whether it is a documentation or what ever. As a first step, I downloaded the source tree for going through the code. However, I thought if some one would've spend enough time to understand the project structure that would help everyone here. Any one point me out where the project structure is well explained?
NOTE: This is not a duplicate of question https://stackoverflow.com/questions/1655090/mono-source-code-walkthrough-tutorial, the answer to this question doesn't suffice my expectation.
You should have checked out (subversion checkout URLs here):
trunk/libgdiplus
This is a library used by System.Drawing.
trunk/mono
This is what we call the Mono runtime. Contains mainly C source code. Under this directory you can find:
trunk/mcs
This is where the C# compiler, the class libraries, class libraries tests and other tools are.
class/ : One folder per assembly. Each of them contains the source code for each assembly split in directories with the namespace name (ie, System/System.Configuration and so on) and usually a Test directory too. The only naming exception is mscorlib whose corresponding folder is called corlib.
For example, if you want to see the source code for System.Net.HttpWebRequest, which is in the System.dll assembly, you go to trunk/mcs/class/System/System.Net and there shoould be a file named HttpWebRequest.cs containing the code you're looking for.
mcs/: the sources for the C# compilers (mcs, gmcs, smcs, dmcs...)
There are a lot more directories around, but those are where you should look for the C and C# code. Also, I suggested trunk for the checkout, since you will get the most up-to-date sources that way.
Update: Mono resides now in github and mcs has been integrated into the mono repository.
Gonzalo provided a good overview of the different modules.
Since you also mentioned wanting to contribute to documentation, you'll want a few more pieces of information.
First, Documentation is stored in XML files within mcs/class/[assembly]/Documentation/, e.g. mcs/class/corlib/Documentation. The intent is to support multiple human languages (though only English is currently being worked on), so within Documentation is a language directory, usually
en
. Withinen
there arens-*.xml
files, e.g. mcs/class/corlib/Documentation/en/ns-System.xml contains documentation for theSystem
namespace. Also withinen
are "dotted namespace" directories, and within those are XML files, one per type, for example mcs/class/corlib/Documentation/en/System.Collections.Generic/IEnumerable`1.xml.This is also outlined within the mdoc(5) documentation, in the
FILE/DIRECTORY STRUCTURE
section.Once you've found the documentation, you need to know the XML format, which is also described in the mdoc(5) documentation, in the
NamespaceName/TypeName.xml File Format
section. The XML dialect used is a variant of the ECMA 335 XML documentation, changed to have one file per type (instead of all types within a single monolithic file). This is also a superset of C# XML documentation (seeAnnex E. Documentation Comments
, page 487).Finally, there's the question of adding new types/members to the mcs/class/[assembly]/Documentation directory. If you have Mono built, you can use the
doc-update
Makefile target. This will run the appropriate assembly through mdoc(1) and update the appropriate files within the Documentation directory.If you have any other documentation questions, don't hesitate to ask on the mono-docs-list mailing list.