Thread overview
[Issue 14811] allow to exclude current directory from search path in dmd
Jul 20, 2015
Timothee Cour
Jul 20, 2015
Timothee Cour
Jul 21, 2015
Timothee Cour
Jul 29, 2015
Kenji Hara
Jul 30, 2015
Timothee Cour
Dec 17, 2022
Iain Buclaw
July 20, 2015
https://issues.dlang.org/show_bug.cgi?id=14811

Timothee Cour <timothee.cour2@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2@gmail.com

--- Comment #1 from Timothee Cour <timothee.cour2@gmail.com> ---
Reduced use case:
see https://github.com/timotheecour/dsnippet/tree/master/bug_14811

make
..//main.d(3): Error: module foo.fun1 from file fun1.d conflicts with another
module fun1 from file ..//foo/fun1.d

With my modification (adds a flag -exclude_cwd_from_imports):
make with_flag
#works

--
July 20, 2015
https://issues.dlang.org/show_bug.cgi?id=14811

--- Comment #2 from Timothee Cour <timothee.cour2@gmail.com> ---
https://github.com/D-Programming-Language/dmd/pull/4823

--
July 21, 2015
https://issues.dlang.org/show_bug.cgi?id=14811

--- Comment #3 from Timothee Cour <timothee.cour2@gmail.com> ---
(In reply to Timothee Cour from comment #2)
> https://github.com/D-Programming-Language/dmd/pull/4823

To test it via Digger:
./digger build "master + timotheecour/dmd/exclude_cwd_from_path"
=> result/bin/dmd

--
July 29, 2015
https://issues.dlang.org/show_bug.cgi?id=14811

--- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> ---
(In reply to Timothee Cour from comment #0)
> (cf forum EMAIL:exclude current directory from search path in dmd ?)

http://forum.dlang.org/thread/mailman.308.1426472794.3111.digitalmars-d-learn@puremagic.com http://forum.dlang.org/thread/CANri+ExGss5FJXBy728rJN9YpvTKoSsk9fzcCrL4vSkuExg13A@mail.gmail.com

(In reply to Timothee Cour from comment #1)
> Reduced use case:
> see https://github.com/timotheecour/dsnippet/tree/master/bug_14811

Why you need to compile the project from the subdir foo/ ? Why you cannot do that from the project root directory?

The feature explanation does not argue the necessity of the enhancement. Please show to us the situation where the feature is necessary.

--
July 30, 2015
https://issues.dlang.org/show_bug.cgi?id=14811

--- Comment #5 from Timothee Cour <timothee.cour2@gmail.com> ---
>> Why you cannot do that from the project root directory?

There's not always an obvious project root directory, eg when using submodules or several outside packages.

>> The feature explanation does not argue the necessity of the enhancement. Please show to us the situation where the feature is necessary.

* I'm not the only one wanting this: http://forum.dlang.org/post/mlqdzpswbwqyrwiibqwg@forum.dlang.org

* It exists in c++ http://stackoverflow.com/questions/12353429/prevent-gcc-from-searching-the-current-dir-i-option-on-include-search-path

* if the 'natural' working directory is foo/ (current directory, where user
edits files etc), wrapping every dmd invocation with
'cd root && dmd some_command  && cd -'
is inconvenient. Eg, the error messages will be wrt to root, not wrt user's
current directory

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=14811

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--