I've attached a reduced use case showing that the solutions proposed in this thread do not work, and wrote a local modification to dmd to allow a flag -exclude_cwd_from_imports that does work. Would that be acceptable to have this in official dmd?
On Sun, Jul 19, 2015 at 8:07 PM, Timothee Cour <[email protected]> wrote: > https://issues.dlang.org/show_bug.cgi?id=14811 > > On Wed, Jun 17, 2015 at 3:22 AM, Liran Zvibel via Digitalmars-d-learn < > [email protected]> wrote: > >> On Monday, 8 June 2015 at 04:08:55 UTC, Adam D. Ruppe wrote: >> >>> The easiest way is to not use search paths, and instead pass all the >>> modules you want compiled to the compiler directly. Then it will look for >>> the module name declaration instead of the directory/filename layout. >>> >> >> I think that this should be an explicit decision to also add -I. to the >> compilation or not. >> >> We (at Weka.IO) have to work extra hard to work around it, and since we >> have a large project with many packages it's impractical to just put >> everything on the command line. >> >> Also -- you WANT imported modules to be imported (and use the .di >> equivalent) instead of being compiled on the command line. >> >> A solution that won't break backwards compatibility and will still make >> sense is have this by default in dmd.conf, and when/if required dmd users >> can just modify their dmd.conf file. >> >> Liran >> > >
