On Tue, Apr 17, 2012 at 10:29:24PM +0400, Dmitry Olshansky wrote:
> On 17.04.2012 22:10, Joseph Rushton Wakeling wrote:
> >Hello all,
> >
> >As per earlier discussion I'm trying to hack on Phobos to update the
> >random sampling code.
> >
> >To do this I've just copied random.d into a new file, randomsample.d,
> >which I'm modifying and messing around with; I'm trying to build against
> >a local copy of the GitHub Phobos sources.
> >
> >When I try and compile,
> >
> >gdc -nophoboslib -I../phobos/ -o randomsample randomsample.d
> >
> 
> First things first - development of phobos is done with dmd. Just
> because gdc is (logically so) somewhat behind dmd and new compiler
> features are still coming with every release.
> 
> The process usually involves git cloning dmd, druntime and phobos.
> Then building all of them in the order of dmd, druntime, phobos.
> The the tricky part is replacing older binaries and library.

You can just edit /etc/dmd.conf to that effect (if it conflicts with
your stable version of dmd, you could try to change the git dmd source
to look for dmd.conf in a different place, say /usr/src/d-devel/dmd.conf
or something, and so you can completely isolate the two installations).


> After fresh cutting phobos edge builts make sure Phobos unittests
> all pass (make -fposix.mak unittest).
> I suggest to just modify phobos sources directly. It's DVCS after
> all so you always have a luxury of commit/revert.

The convention is to create a branch for making changes, this way it's
very easy to generate pull requests on github if you ever wanted to
contribute your code to the official codebase. Branches are super-cheap
in git anyway, and you can edit source files to your heart's content
since you can easily switch back to master if you mess something up.


T

-- 
My program has no bugs! Only unintentional features...

Reply via email to