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.

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.

and rdmd --main -unittest /path/to/std/random.d
works wonders in development cycle.

Thanks & best wishes,

-- Joe


--
Dmitry Olshansky

Reply via email to