www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - using unmerged PRs

reply "Vlad Levenfeld" <vlevenfeld gmail.com> writes:
I was looking at some of the PRs for DIPs and was wondering how
to go ahead and use them in my code. A few of the forum regulars
have mentioned applying their own patches before, and so I would
like to ask those of you that do, what your preferred method is,
or if this is an all-around bad idea and I should just wait for
the PRs to be merged?
Dec 25 2014
next sibling parent ketmar via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Thu, 25 Dec 2014 20:15:10 +0000
Vlad Levenfeld via Digitalmars-d <digitalmars-d puremagic.com> wrote:

 I was looking at some of the PRs for DIPs and was wondering how
 to go ahead and use them in my code. A few of the forum regulars
 have mentioned applying their own patches before, and so I would
 like to ask those of you that do, what your preferred method is,
 or if this is an all-around bad idea and I should just wait for
 the PRs to be merged?
as for me, i have a build script for that. my directory structure looks like this: dmd_git dmd druntime phobos tools build script in BUILD/ does `git reset --hard ; git clean -dxf` for all repos, and then applies *.patch files found in corresponding subdirs of PATHCES to corresponding components. it also does alphanumeric sorting of patch files, so i can control the order of applying. to temporarily disable some patch i can rename it to something like "abc.patch.no" (any extension, actually). also i'm adding some comments and dependencies to patch files. patch utility ignores that. my build script accept some args too: % ./build.sh -h --noreset -- don't do 'git reset --hard' --nopatch -- don't do patching --phobos -- build phobos --runtime -- build runtime --dmd -- build dmd --debug -- enable debug build --all -- build all (default) --cdgc -- build with CDGC this is not the best way to manage patches, it simply emerges from my simplistic build scripts as i was adding features over time. i also has 'install.sh' script, which installs fresh DMD into my local binary dir, writes proper dmd.conf, builds tools and copies them to the place where DMD binary is. and 'update.sh' script, which updates all components and writes update logs. update logs are just a snippets of 'git log' -- from the new HEAD till the old HEAD, so i can easily read what's new here while building fresh DMD in another terminal.
Dec 25 2014
prev sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Thursday, 25 December 2014 at 20:15:11 UTC, Vlad Levenfeld 
wrote:
 I was looking at some of the PRs for DIPs and was wondering how
 to go ahead and use them in my code. A few of the forum regulars
 have mentioned applying their own patches before, and so I would
 like to ask those of you that do, what your preferred method is,
 or if this is an all-around bad idea and I should just wait for
 the PRs to be merged?
There is https://github.com/CyberShadow/Digger which will automate the process for you.
Dec 25 2014
parent "Vlad Levenfeld" <vlevenfeld gmail.com> writes:
Thanks, guys! Custom build scripts are beyond me at the moment (I
just use posix-make-install script from dmd website, at most I
will throw in -g to check out what dmd does behind the scenes) so
I'll give Digger a shot.
Dec 25 2014