-
Notifications
You must be signed in to change notification settings - Fork 915
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
Change json gtest environment variable to compile-time definition #14541
Change json gtest environment variable to compile-time definition #14541
Conversation
print_tree(gpu_tree); | ||
} | ||
#if NJP_DEBUG_DUMP | ||
printf("AFTER traversal (gpu_tree):\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printf("AFTER traversal (gpu_tree):\n"); | |
printf("AFTER traversal (gpu_tree):\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was done on purpose to line up with line 880: BEFORE
output (which has 1 more letter than AFTER
) .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgive my obsession with std print alignment! 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aesthetics is to be admired not scorned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that @davidwendt figured it out :)
We should take this opportunity to argue about "tabs vs spaces" once again :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. I would prefer a different name that I recognize -- NJP
presumably stands for "new JSON parser" but I wouldn't have guessed that without the crowd wisdom from @vuule's recent talk. Suggesting LIBCUDF_JSON_DEBUG_DUMP
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me.
MacroNJP_DEBUG_DUMP
was introduced during development of nested json parser (NJP @elstehle ) and we continued to use it.
Reasoning for still having these macros around: these macros are useful in debugging the json reader while adding new features.
/merge |
…pidsai#14541) Changes the `NJP_DEBUG_DUMP` environment variable used in `json_tree.cpp` gtest source to a local `#define` compile-time definition instead. This preserves the rather complex code for debugging json parsing without requiring building it otherwise. This is part of larger work to refactor and document env vars in the libcudf code. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Nghia Truong (https://github.com/ttnghia) - Bradley Dice (https://github.com/bdice) - Karthikeyan (https://github.com/karthikeyann) URL: rapidsai#14541
Description
Changes the
NJP_DEBUG_DUMP
environment variable used injson_tree.cpp
gtest source to a local#define
compile-time definition instead. This preserves the rather complex code for debugging json parsing without requiring building it otherwise.This is part of larger work to refactor and document env vars in the libcudf code.
Checklist