Thread overview
Support for Dub
May 10, 2014
Jacob Carlborg
May 12, 2014
Sönke Ludwig
May 12, 2014
Jacob Carlborg
May 10, 2014
For those who haven't noticed Etienne Cimon has created a pull request [1] which adds support for Dub to the DWT project.

Currently the DWT project is divided among a couple of git repositories: one of Windows, one for Linux, one for the Java API and one for snippets. These git repositories are included as git submodules in the an additional repository called "dwt".

The problem is that currently Dub doesn't support git submodules. So I'm thinking about how fit DWT as a Dub package. The current approach by Etienne is to run "git submodule update" in the Dub "preGenerateCommands" command. I'm not so sure I like this approach.

The question is then: how should we organize DWT to fit as a Dub package? Here are a couple of ideas:

* Merge the Windows, Linux and snippets repositories in the main repository. This is how the SWT repository is organized, one single git repository. This would also solve the problem with the duplicated code that exists in the Linux and Windows repositories. This is the platform independent code like the custom widgets. I would still like to have the Java API as a separate git repository, since this is useful without the DWT repository

* Create a Dub package of each git repository and remove the git submodules. I don't know how this should be done, perhaps with a main package and has depends on the Linux and Windows packages. This would create extra Dub packages that are not useable on its own

I think I like the first one best, but that would require most work as well.

Other ideas?

[1] https://github.com/d-widget-toolkit/dwt/pull/13

-- 
/Jacob Carlborg
May 12, 2014
Am 10.05.2014 11:29, schrieb Jacob Carlborg:
> For those who haven't noticed Etienne Cimon has created a pull request
> [1] which adds support for Dub to the DWT project.
>
> Currently the DWT project is divided among a couple of git repositories:
> one of Windows, one for Linux, one for the Java API and one for
> snippets. These git repositories are included as git submodules in the
> an additional repository called "dwt".
>
> The problem is that currently Dub doesn't support git submodules. So I'm
> thinking about how fit DWT as a Dub package. The current approach by
> Etienne is to run "git submodule update" in the Dub
> "preGenerateCommands" command. I'm not so sure I like this approach.
>
> The question is then: how should we organize DWT to fit as a Dub
> package? Here are a couple of ideas:
>
> * Merge the Windows, Linux and snippets repositories in the main
> repository. This is how the SWT repository is organized, one single git
> repository. This would also solve the problem with the duplicated code
> that exists in the Linux and Windows repositories. This is the platform
> independent code like the custom widgets. I would still like to have the
> Java API as a separate git repository, since this is useful without the
> DWT repository
>
> * Create a Dub package of each git repository and remove the git
> submodules. I don't know how this should be done, perhaps with a main
> package and has depends on the Linux and Windows packages. This would
> create extra Dub packages that are not useable on its own
>
> I think I like the first one best, but that would require most work as
> well.
>
> Other ideas?
>
> [1] https://github.com/d-widget-toolkit/dwt/pull/13
>

Just an idea (although I'd also prefer the first option), subtree merging [1] is a nice alternative to git submodules, which would also work properly for GitHub+DUB. The structure could stay the same and only changes would be required in the main repository.

[1]: http://git-scm.com/book/en/Git-Tools-Subtree-Merging
May 12, 2014
On 12/05/14 10:33, Sönke Ludwig wrote:

> Just an idea (although I'd also prefer the first option), subtree
> merging [1] is a nice alternative to git submodules, which would also
> work properly for GitHub+DUB. The structure could stay the same and only
> changes would be required in the main repository.
>
> [1]: http://git-scm.com/book/en/Git-Tools-Subtree-Merging

Yeah, I'll have to take a look at subtree merging again to refresh my memory.

-- 
/Jacob Carlborg