A suggestion for modules names / sharing code between projects

Sebastien Alaiwan via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 29 13:43:31 PST 2016


On Monday, 29 February 2016 at 21:33:37 UTC, Adam D. Ruppe wrote:
> On Monday, 29 February 2016 at 21:04:52 UTC, Sebastien Alaiwan 
> wrote:
>> Ok so now let's say I rename the directory "lib" to "foo". If 
>> I don't change the "import lib.hello" to "import foo.hello", 
>> how is the compiler going to find "hello.d"?
>
> You have to tell the compiler where it is.
Is it only possible with separate compilation?

> Either way, the module name is *not* optional.
>
>> (As a reminder, as I said, I'm using separate compilation)
>
> meh that's part of your problem, why are you doing it that way?
Because it reduces turnaround time (this is something I actually 
measured on the project I'm currently working on). Having to 
recompile everything each time I make a modification takes up to 
25s on this project. By the way, I'm using gdc. Is it also part 
of my problem? :-)




More information about the Digitalmars-d mailing list