-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace uses of __FILE__ with __FILE_NAME__ in macros #159
Comments
This came up because of #160 and the specific issues that avoiding |
Agree Though as discussed offline, it is not uncommon to have multiple files in the same project with the same name (like |
Started playing with an alternative approach to remap The benefit is we are able to turn our existing absolute paths, which we agree are not as meaningful, into relative paths that keep the important context. Also it means we only need to change our compiler flags, which is a simpler change to roll out across projects Would be great to have a few people look at this as an option cc @bdice (as you may be interested in this approach as well) |
The macros that we use currently embed full paths to files. These paths are not necessarily informative, and they have a handful of issues. One is that when building conda packages we wind up embedding various fictitious paths that will not exist on the final machine where the binaries are run. Another issue is that header-only libraries will bring in paths from their source into consuming libraries (e.g. rmm paths wind up inside cudf). Instead of using
__FILE__
in macros, we should use__FILE_NAME__
, which only prints the filename without the path.The text was updated successfully, but these errors were encountered: