www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd,druntime,phobos,etc as submodules

reply Timothee Cour via Digitalmars-d <digitalmars-d puremagic.com> writes:
Is there any reason not to use git submodules to organize the various
common dlang repos?

see relevant discussion:

*
http://www.digitalmars.com/d/archives/digitalmars/D/The_annoying_D_build_system_181472.html
[from 2012]

* http://comments.gmane.org/gmane.comp.lang.d.general/172893

* [llvm-dev] Git Move: GitHub+modules proposal
where llvm is proposing doing the same: Move to GitHub with N+1 projects:
all current LLVM projects + the "llvm-projs" umbrella. The latter will have
all other projects as
"submodules" with the intent to:"
Jun 27 2016
next sibling parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 28/06/2016 6:49 PM, Timothee Cour via Digitalmars-d wrote:
 Is there any reason not to use git submodules to organize the various
 common dlang repos?

 see relevant discussion:

 *
 http://www.digitalmars.com/d/archives/digitalmars/D/The_annoying_D_build_system_181472.html
 [from 2012]

 * http://comments.gmane.org/gmane.comp.lang.d.general/172893

 * [llvm-dev] Git Move: GitHub+modules proposal
 where llvm is proposing doing the same: Move to GitHub with N+1
 projects: all current LLVM projects + the "llvm-projs" umbrella. The
 latter will have all other projects as
 "submodules" with the intent to:"
I can't remember who, but somebody does have a repo that groups them as submodules.
Jun 27 2016
parent Seb <seb wilzba.ch> writes:
On Tuesday, 28 June 2016 at 06:54:43 UTC, rikki cattermole wrote:
 On 28/06/2016 6:49 PM, Timothee Cour via Digitalmars-d wrote:
 Is there any reason not to use git submodules to organize the 
 various
 common dlang repos?

 see relevant discussion:

 *
 http://www.digitalmars.com/d/archives/digitalmars/D/The_annoying_D_build_system_181472.html
 [from 2012]

 * http://comments.gmane.org/gmane.comp.lang.d.general/172893

 * [llvm-dev] Git Move: GitHub+modules proposal
 where llvm is proposing doing the same: Move to GitHub with N+1
 projects: all current LLVM projects + the "llvm-projs" 
 umbrella. The
 latter will have all other projects as
 "submodules" with the intent to:"
I can't remember who, but somebody does have a repo that groups them as submodules.
It's CyberShadow: https://bitbucket.org/cybershadow/d/src used e.g. for his Digger http://digger.k3.1azy.net/trend/
Jun 28 2016
prev sibling parent reply qznc <qznc web.de> writes:
On Tuesday, 28 June 2016 at 06:49:03 UTC, Timothee Cour wrote:
 Is there any reason not to use git submodules to organize the 
 various common dlang repos?

 see relevant discussion:

 * 
 http://www.digitalmars.com/d/archives/digitalmars/D/The_annoying_D_buil
_system_181472.html [from 2012]

 * http://comments.gmane.org/gmane.comp.lang.d.general/172893

 * [llvm-dev] Git Move: GitHub+modules proposal
 where llvm is proposing doing the same: Move to GitHub with N+1 
 projects:
 all current LLVM projects + the "llvm-projs" umbrella. The 
 latter will have
 all other projects as
 "submodules" with the intent to:"
I don't believe a root repo makes sense. Submodules should be used to model actual dependencies. For example, phobos does not depend on dmd, since it could be ldc or gdc as well. Some dependencies are: dmd depends on druntime and phobos; phobos depends on druntime. However, you cannot give dmd *and* phobos a druntime submodule, since that would duplicate it. Currently, the assumed directory structure is to have dmd, phobos, druntime side by side. Using my submodules philosophy would change that to a nested structure. Probably not worth the hassle.
Jun 28 2016
parent reply qznc <qznc web.de> writes:
On Tuesday, 28 June 2016 at 09:13:40 UTC, qznc wrote:
 I don't believe a root repo makes sense.

 Submodules should be used to model actual dependencies.
 For example, phobos does not depend on dmd, since it could be 
 ldc or gdc as well.

 Some dependencies are: dmd depends on druntime and phobos; 
 phobos depends on druntime. However, you cannot give dmd *and* 
 phobos a druntime submodule, since that would duplicate it.

 Currently, the assumed directory structure is to have dmd, 
 phobos, druntime side by side. Using my submodules philosophy 
 would change that to a nested structure. Probably not worth the 
 hassle.
I forgot to mention the advantage of the nested submodules approach: You can bisect for bugs. You cannot do that with completely separate repos, since there is no way to know which revisions work together.
Jun 28 2016
parent Steven Schveighoffer <schveiguy yahoo.com> writes:
On 6/28/16 5:17 AM, qznc wrote:
 On Tuesday, 28 June 2016 at 09:13:40 UTC, qznc wrote:
 I don't believe a root repo makes sense.

 Submodules should be used to model actual dependencies.
 For example, phobos does not depend on dmd, since it could be ldc or
 gdc as well.

 Some dependencies are: dmd depends on druntime and phobos; phobos
 depends on druntime. However, you cannot give dmd *and* phobos a
 druntime submodule, since that would duplicate it.

 Currently, the assumed directory structure is to have dmd, phobos,
 druntime side by side. Using my submodules philosophy would change
 that to a nested structure. Probably not worth the hassle.
I forgot to mention the advantage of the nested submodules approach: You can bisect for bugs. You cannot do that with completely separate repos, since there is no way to know which revisions work together.
You could have d distribution package repo depend on all 3 components. It would simplify the build. -Steve
Jun 28 2016