Re: Do you have any suggestions for project directory structure?

2014-02-05 Thread Jesse Phillips
I'm not sure I would recommend this, but I've been using 
something like this:


 protocols
  ├── dmocks (I don't use this)
  │   └── *.d
  ├── libs
  │   └──foo
  │   └── *.d
  │   └── bar
  │   └── source
  │ └── *.d
  │
  ├── source
  │   └── protocols
  │   └── *.d

The libraries can actually have dependencies on other libraries, 
in this case bar requires foo and will expect to find ../foo


Re: Do you have any suggestions for project directory structure?

2014-02-05 Thread Dicebot

On Wednesday, 5 February 2014 at 22:01:08 UTC, Orfeo wrote:

On Wednesday, 5 February 2014 at 21:54:15 UTC, Dicebot wrote:

I'd try to keep external libraries out of the main source [cut]


Something like this?
 ├── protocols
 │   └── src
 ├── dmocks
 │   └── *.d
 ├── foo
 │   └── *.d


Yes. And make sure build script for your project allows to define 
path to external import folder(s).


dub automates that for you


Re: Do you have any suggestions for project directory structure?

2014-02-05 Thread Orfeo

On Wednesday, 5 February 2014 at 21:54:15 UTC, Dicebot wrote:

I'd try to keep external libraries out of the main source [cut]


Something like this?
 ├── protocols
 │   └── src
 ├── dmocks
 │   └── *.d
 ├── foo
 │   └── *.d




Re: Do you have any suggestions for project directory structure?

2014-02-05 Thread Chris Williams

On Wednesday, 5 February 2014 at 21:50:17 UTC, Orfeo wrote:
Suppose I have a project "protocols" that uses DMock and a  
library Foo.
I would like to use a structure dub style..Which solution is 
better:


A.

protocols
 ├── bin
 │   └── protocols.a
 ├── dmocks
 │   └── *.d
 ├── foo
 │   └── *.d
 ├── src
 │   └── protocols
 │   └── *.d

B.

protocols
 ├── bin
 │   └── protocols.a
 ├── src
 │   ├── dmocks
 │   │└── *.d
 │   ├── foo
 │   │└── *.d
 │   └── protocols
 │└── *.d


Or another solution?
Thanks


I would probably advise against having the outside libraries 
inside your project at all. Have them parallel to protocols 
either add a /lib folder to protocols that can hold their 
binaries or pull from the outside (you'll need to point your 
includes outside your own project anyways).


Re: Do you have any suggestions for project directory structure?

2014-02-05 Thread Dicebot
I'd try to keep external libraries out of the main source 
directory or as part of separate git submodule hierarchy if using 
stuff like dub is not an option. They don't belong to project 
sources.


Do you have any suggestions for project directory structure?

2014-02-05 Thread Orfeo
Suppose I have a project "protocols" that uses DMock and a  
library Foo.
I would like to use a structure dub style..Which solution is 
better:


A.

protocols
 ├── bin
 │   └── protocols.a
 ├── dmocks
 │   └── *.d
 ├── foo
 │   └── *.d
 ├── src
 │   └── protocols
 │   └── *.d

B.

protocols
 ├── bin
 │   └── protocols.a
 ├── src
 │   ├── dmocks
 │   │└── *.d
 │   ├── foo
 │   │└── *.d
 │   └── protocols
 │└── *.d


Or another solution?
Thanks