www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Announcing the existence of dlang-workspace

reply "Nathan M. Swan" <nathanmswan gmail.com> writes:
dlang-workspace is a folder/config structure that allows you to 
easily contribute to the D projects (dmd, druntime, phobos) while 
not tampering with (or relying on) your standard installation.

It's been tested on OSX and Debian, more testing and Windows 
support are appreciated.

     https://github.com/carlor/dlang-workspace

Thanks for checking it out.

NMS

-- README.md pasted here --

`dlang-workspace` contains the basic configurations for hacking 
on your own
fork of `dmd`, `druntime`, and `phobos` on nix systems, while not 
conflicting
with your installed stable version.

To install:

     $ git clone git://github.com/carlor/dlang-workspace.git dlang
     $ cd dlang/
     $ git clone <dmd,      the central repo or your fork>
     $ git clone <druntime, the central repo or your fork>
     $ git clone <phobos,   the central repo or your fork>

Now, you can run the `posix/gen.sh` script to build all 
repositories. You can
specify what item specifically to build (`dmd`, `phobos`, or 
`druntime`) as a
parameter to `gen.sh`.

It makes an executable which links to your fork of 
druntime/phobos called `wbd`.
You guess the acronym (hint: MRI).

You can specify what item specifically to build (`dmd`, `phobos`, 
or `druntime`)
as a parameter to `gen.sh`.

Everything applicable is released under the GPLv3.

Platform Support
----------------
This has been tested on OSX, Debian, and Ubuntu, and works 
without a standard
install of the D system.

It doesn't work on Windows; pull requests to add support for 
that, or anything
else, are appreciated.
Dec 06 2012
next sibling parent Philippe Sigaud <philippe.sigaud gmail.com> writes:
--20cf300e4befb9e16204d035c65b
Content-Type: text/plain; charset=UTF-8

 To install:

     $ git clone git://github.com/carlor/dlang-**workspace.git<http://github.com/carlor/dlang-workspace.git>dlang
     $ cd dlang/
     $ git clone <dmd,      the central repo or your fork>
     $ git clone <druntime, the central repo or your fork>
     $ git clone <phobos,   the central repo or your fork>

 Now, you can run the `posix/gen.sh` script to build all repositories. You
 can
 specify what item specifically to build (`dmd`, `phobos`, or `druntime`)
 as a
 parameter to `gen.sh`.

 It makes an executable which links to your fork of druntime/phobos called
 `wbd`.
 You guess the acronym (hint: MRI)

Works like a charm here! (Kubuntu). You code builds dmd and the rest flawlessly and the resulting executable works OK. Great! Building and rebuilding was exactly what stopped me from using the lastest DMD. Now, I can test my projects with both 2.060 and the latest git HEAD. Eh, compilation is 10% faster with 2.061 than with 2.060! And all unit tests pass, woo hoo! Thanks a lot Nathan! --20cf300e4befb9e16204d035c65b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"m= argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> To install:<br> <br> =C2=A0 =C2=A0 $ git clone git://<a href=3D"http://github.com/carlor/dlang-w= orkspace.git" target=3D"_blank">github.com/carlor/dlang-<u></u>workspace.gi= t</a> dlang<br> =C2=A0 =C2=A0 $ cd dlang/<br> =C2=A0 =C2=A0 $ git clone &lt;dmd, =C2=A0 =C2=A0 =C2=A0the central repo or = your fork&gt;<br> =C2=A0 =C2=A0 $ git clone &lt;druntime, the central repo or your fork&gt;<b= r> =C2=A0 =C2=A0 $ git clone &lt;phobos, =C2=A0 the central repo or your fork&= gt;<br> <br> Now, you can run the `posix/gen.sh` script to build all repositories. You c= an<br> specify what item specifically to build (`dmd`, `phobos`, or `druntime`) as= a<br> parameter to `gen.sh`.<br> <br> It makes an executable which links to your fork of druntime/phobos called `= wbd`.<br> You guess the acronym (hint: MRI)<br></blockquote><div><br></div><div>Works= like a charm here! (Kubuntu). You code builds dmd and the rest flawlessly = and the resulting executable works OK. Great! Building and rebuilding was e= xactly what stopped me from using the lastest DMD.</div> <div>Now, I can test my projects with both 2.060 and the latest git HEAD.= =C2=A0</div><div><br></div><div>Eh, compilation is 10% faster with 2.061 th= an with 2.060! And all unit tests pass, woo hoo!</div><div><br></div><div>T= hanks a lot Nathan!</div> </div> --20cf300e4befb9e16204d035c65b--
Dec 06 2012
prev sibling next sibling parent reply "Jesse Phillips" <Jessekphillips+D gmail.com> writes:
On Thursday, 6 December 2012 at 20:31:03 UTC, Nathan M. Swan 
wrote:
     $ git clone git://github.com/carlor/dlang-workspace.git 
 dlang
     $ cd dlang/
     $ git clone <dmd,      the central repo or your fork>
     $ git clone <druntime, the central repo or your fork>
     $ git clone <phobos,   the central repo or your fork>

Highly, highly recommend using submodules so this becomes $ git submodule init $ git submodule update Everyone will still be able to update the folders to the latest in the same manner as currently done. And it will have the benefit of having a selection of commits that are known to work together and with the provided tools. $ git submodule add repo dir ... ... This will also be most appropriate if it gets official claim.
Dec 06 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-12-07 01:24, Jesse Phillips wrote:

 $ git submodule init
 $ git submodule update

Or just one command: $ git submodule update --init -- /Jacob Carlborg
Dec 06 2012
prev sibling next sibling parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
Thanks! This is great! :)

I've tried it on Scientific Linux 6.1.

On 12/06/2012 12:31 PM, Nathan M. Swan wrote:

 Now, you can run the `posix/gen.sh` script to build all repositories.

In my case, posix/gen.sh was not executable. I did this: $ chmod a+x posix/gen.sh wbd was built successfully (with the expected deprecation warnings from Phobos). One thing I've noticed is that I could compile programs only if wbd has been started from within this directory. No big deal... Ali
Dec 06 2012
prev sibling parent "Jesse Phillips" <Jesse.K.Phillips+D gmail.com> writes:
In response to an email Nathan wrote:

Submodules seem to be meant for including a project you're not 
working on, just >referencing (i.e. a library).

dlang-workspace is built for contributors for D in mind, so 
there will be a lot >of forking/branching, something submodules 
to not handle well.

I'm not experienced in this though, so tell if I'm wrong.

Thanks,
NMS

Wrong, all submodules will do is store the hash for each repo. This is really good because even with projects you work on you'll require all three (Phobos, druntime, dmd) to be in a specific version that is compatible with your changes. It does mean that by default you are unlikely to check out the latest of all three (since I doubt you'll be updating the repo for that. However, consider the developer here. They are making some changes, then need to test a pull request, this pull request uses a newer version of dmd. They will then be able to commit all their changes including the current commit of the dependent DMD, checkout the new development branch with whatever version of dmd is needed. When testing is done they checkout their branch update the submodules and continue their work updating and testing dmd when ready for the pull request. It does actually make it more complicated as to get the latest it would be: $ git submodule update --init $ cd dir $ git --rebase pull ... But really a utility can have that: ./latest.sh
Dec 07 2012