Contributions to Phobos will go through a review process, read more here.
While writing source code for D, keep the D Style in mind.
1. You need to download and install the following tools:
- the LATEST version of the DMD compiler and tools http://dlang.org/download.html. The other compilers are usually somewhat behind DMD.
- DVM: https://bitbucket.org/doob/dvm
Clone dmd, druntime and phobos to <path> from github:
git clone https://github.com/D-Programming-Language/druntime.git <path> git clone https://github.com/D-Programming-Language/dmd.git <path> git clone https://github.com/D-Programming-Language/phobos.git <path>Then create a branch for making your changes.
git branch mychanges git checkout mychangesThis way you can edit source files to your heart's content since you can easily and switch back to the master branch whenever you mess something up.
3. Run "dvm compile <path>". This will compile dmd, druntime and phobos (in this order) and setup a correct dmd.conf file. The binary will be placed in <path>/dmd/bin<arch>.
You can create a build script, <path>/phobos/build.sh, looking something like this:
#!/bin/bash dvm compile .. rdmd --compiler=../dmd/bin<arch>/dmd --build-only main.dmain.d and build.sh can be added to <path>/phobos/.git/info/exclude to be ignored.
4. After a fresh cutting edge phobos builds and runs successfully, make sure Phobos unittests all pass (make -fposix.mak unittest).