-
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
Add JSON project #1061
Add JSON project #1061
Conversation
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.
LGTM. A minor suggestion about dir structure.
production/CMakeLists.txt
Outdated
set(JSON "${GAIA_REPO}/third_party/production/json") | ||
set(JSON_INC "${JSON}/json/single_include/nlohmann") |
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.
nit: My suggestion would be to keep the directory structure simple.
Instead of third_party/production/json/json/single_include/nlohmann/
put the header into third_party/production/json/include/nlohmann
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.
Of course that's easy, but I put the header in the spot it will be if we ever clone the entire project. That way nothing else would change.
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 don't think that avoiding a few small changes now for a potential big inclusion later matters much. We already moved the file once, we can move it once more if we want to use more of that project.
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.
Okay, the file is in third_party/production/json/json.hpp
.
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 would keep the following path: third_party/production/json/include/nlohmann/json.hpp
include/
is standard because you don't wanna include the entire directory which contains the gdev file.nlohmann
allows understanding what json library we are talking about, so that you can#include <nlohmann/json.hpp>
…aPlatform into wayne/add-json-project
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 good. If for some reason you don't get to fix Jack's code as part of this PR, then just make sure that you open a tracking item for that cleanup, so we don't forget to do it.
Jack's testing assumes an installed SDK. To eliminate |
I'm a bit confused. If our SDK doesn't require the json header, we should not distribute it in the SDK. If @JackAtGaia 's testing requires the json header, then it should look it up from the 3rd party directory, not expect it to get distributed with the SDK. Anyway, I guess that can be discussed in the JIRA item - can you include a link to it in a reply, so we can easily navigate from this discussion to it? |
I think the point is that @JackAtGaia's tests are designed as standalone applications, that do not include/link code from the Gaia source tree, they just happen to be on the same source tree, like our hackathon apps. It makes sense for a standalone app to include whatever it needs. |
Yes, but it doesn't make sense for the SDK to include that. So the "standalone apps" should leverage existing code instead of duplicating it all over the place.in the same source tree. What's the JIRA item? |
Agree
Potentially yes.
There is no JIRA item AFAIK... |
@waynelwarren promised to create one:
@waynelwarren : can you please create the JIRA item and reply here with its link? |
Here's the item I created yesterday. https://gaiaplatform.atlassian.net/browse/GAIAPLAT-1668 |
Rather than creating gdev.cfg or CMakeLists.txt files to handle the cloning of the nlohmann/json project, I have copied the single file that we actually need. It resides in the directory it would be in if the entire project was there.
We may ultimately want to make this more automatic, but this satisfies our current needs.
I have also copied the licence information from the header into our licenses file.