@maxhaton created dlang/dmd pull request #13947 "Fix Issue 22987 - Make traits getLocation have an option to return an…" fixing this issue:
- Fix Issue 22987 - Make traits getLocation have an option to return an absolute path
The feature is required for an application of metaprogramming within Symmetry.
A flag is added rather than changing the default in case it breaks something.
https://github.com/dlang/dmd/pull/13947
Comment #3 by alphaglosined — 2024-03-26T05:54:31Z
(In reply to Walter Bright from comment #2)
> Why not use:
>
> https://dlang.org/phobos/std_path.html#absolutePath
That would require knowing the base address to make absolute against.
For build systems like dub, that information may very well not exist, or be assumable.
You have to make assumptions to reconstruct information that the compiler could just tell you. That is not a good solution, it is a workaround at best.
Not to mention cross compilation could result in a wrong result if it works at all.
Comment #4 by robert.schadek — 2024-12-13T19:22:03Z