On 9/2/20 4:48 PM, Andrey Zherikov wrote:
On Wednesday, 2 September 2020 at 20:23:15 UTC, Steven Schveighoffer wrote:
What I'm wondering is if it needs to be ./file instead of .\file. Can
you hard code that and see if it works?
This actually works:
pragma(msg, import("file"));
pragma(msg, buildPath(".", "file"));
pragma(msg, import("./file"));
Result on Ubuntu:
=======
hello
../file
hello
=======
Result on Windows:
=======
hello
..\file
hello
=======
This seems weird that I can't use std.path functions or use valid
"foo\bar" paths on Windows.
I don't know why it wouldn't work with native paths on Windows. But I'm
not a DMD maintainer, so I don't know where to look in the code to see
why it doesn't work.
It might be worth filing a bug. https://issues.dlang.org
-Steve