Difference between revisions of "Pull Requests"

From D Wiki
Jump to: navigation, search
(Guide on pull requests)
 
(Link to section)
 
(35 intermediate revisions by 11 users not shown)
Line 1: Line 1:
The source code of the D compiler (dmd), runtime library (druntime), and standard library (Phobos), are all available at [https://github.com/D-Programming-Language GitHub].
+
#REDIRECT [[Starting as a Contributor#Create_a_pull_request]]
 
 
==Creating your fork==
 
 
 
To contribute to the D compiler, runtime library, or standard library, you need to create an account on GitHub, and then navigate to the D programming language project (as linked above), then create a fork of that project.
 
 
 
For example, if you wish to submit a patch to the D compiler, you should navigate to [https://github.com/D-Programming-Language/dmd D-Programming-Language/dmd], then click on the "Fork" button at the top right corner of the page. This will clone the D compiler sources into your list of projects.
 
 
 
==Checkout the sources==
 
 
 
{{seealso|Using Git on Windows}}
 
 
 
Once you have forked the project you wish to contribute to, use git to checkout a local copy of the project.
 
 
 
Generally, you should checkout a copy of at least dmd, druntime, and phobos in order to have a working compiler toolchain that you can use to test your changes.
 
 
 
===Source code structure===
 
 
 
The D source code assumes a particular directory structure, which you probably would want to adopt so that you don't have to fiddle with the Makefiles all the time.
 
 
 
====Posix====
 
 
 
For Posix, it is assumed that you will have a common root directory where the compiler and library sources will sit under. For example, you can choose the common root directory to be /usr/src/d, then you can checkout the sources under this directory:
 
 
 
<pre>
 
% mkdir /usr/src/d
 
% cd /usr/src/d
 
% git clone git://github.com/D-Programming-Language/dmd.git
 
% git clone git://github.com/D-Programming-Language/druntime.git
 
% git clone git://github.com/D-Programming-Language/phobos.git
 
</pre>
 
 
 
You should end up with this directory structure:
 
 
 
<pre>
 
/usr/src/d/
 
/usr/src/d/dmd
 
/usr/src/d/druntime
 
/usr/src/d/phobos
 
</pre>
 
 
 
====Windows====
 
 
 
'''TBD'''
 

Latest revision as of 10:30, 4 December 2015