[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 08:40:31 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=10209
Seb <greensunny12 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |greensunny12 at gmail.com
Resolution|--- |WONTFIX
--- Comment #2 from Seb <greensunny12 at gmail.com> ---
That's expected - __FILE__ returns a relative path whereas if you set -J/ it
would now require an absolute on.
1) -J. works fine:
https://run.dlang.io/is/eOIuJm
2) -J/ needs an absolute path -> __FILE_FULL_PATH__
https://run.dlang.io/is/dV2Q8b
3) readText(__FILE__) works - that's a runtime function - not CTFE which you
instructed to search in your current directory
4) -J/ is quite an anti-pattern
=> closing this as WONTFIX
--
More information about the Digitalmars-d-bugs
mailing list