[Issue 2759] New: ImportExpression does not respect relative paths
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 24 18:14:48 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2759
Summary: ImportExpression does not respect relative paths
Product: D
Version: 1.041
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: cslush at gmail.com
Currently, when an import("file.txt") is done in code, it uses the -Jpath flag
during compile time and expects the "file.txt" to exist in the path defined by
-Jpath. If I wanted to access a file relative to the path in -Jpath, naturally
I would do an import("relative/path/to/file.txt"). This works fine in windows,
but fails in Linux.
The main reason I'd like to do this is so that I can specify a root path for
all resources that get imported at compile time and keep them tidily organized
in subdirectories.
After looking at the dmd source code, it is clear that relative pathing is
prevented. I propose that this check is removed from the compiler altogether,
so that a relative path is allowed. Any reason that this isn't allowed already?
--
More information about the Digitalmars-d-bugs
mailing list