How about introduce instead a __DIR__ trait which is equal to the absolute path of current directory during compilation.
Advantages:
* no need to change function signatures:
void fun(int arg0, string file=__FILE__, int line=__LINE__){
enum file_full_path=buildPath(__DIR__, file);
// file_full_path can be used at compile time if needed
}
instead of changing to:
void fun(int arg0, string file= __FILE_FULL_PATH__, int line=__LINE__){ ...}
* more flexible: we can have both __FILE__ and it's absolute version
* smaller binaries (no need to store redundant path information in __FILE_FULL_PATH__ when __DIR__ + __FILE__ is enough)
__FILE_FULL_PATH__ can be put in deprecation path
NOTE: there is areal use case for having a full path available [see see associated discussion in pull
https://github.com/dlang/dmd/pull/5959], the one proposed here (__DIR__) is less intrusive: function signature doesn't change, but implementation can add __DIR__ to get absolute path when needed.