exclude current directory from search path in dmd ?

Timothee Cour via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 19 20:32:30 PDT 2015


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 <thelastmammoth at gmail.com>
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 <
> digitalmars-d-learn at puremagic.com> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150719/99c69a67/attachment.html>


More information about the Digitalmars-d-learn mailing list