[Issue 10209] string import doesn't work with dmd -J/ /path/to//file.d
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 3 09:52:49 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=10209
Timothee Cour <timothee.cour2 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |timothee.cour2 at gmail.com
Resolution|WONTFIX |---
--- Comment #3 from Timothee Cour <timothee.cour2 at gmail.com> ---
> That's expected - __FILE__ returns a relative path whereas if you set -J/ it would now require an absolute on.
That is incorrect, as you can check with `pragma(msg, __FILE__);`
__FILE__ returns either a relative or absolute path depending on how the file
is given on command line. As you can see in my original example, `dmd -J/
/path/to//file.d` __FILE__ will be absolute.
> 4) -J/ is quite an anti-pattern
That's irrelevant, I could've used any other path that contains a `//`, eg:
`dmd -J. -o- .//main.d` also fails
Like I said in the original post (please re-read more carefully):
"problem when a path argument given to dmd contains a '//' instead of '/':"
Note that -I has no problems with paths that contains a `//`.
--
More information about the Digitalmars-d-bugs
mailing list