-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Refacto/split basic json #643
Refacto/split basic json #643
Conversation
It's weird that codacy only complains now, I did not change this code. |
5aacb35
to
5d71dfb
Compare
I forgot to use the public API in every class i've split (except The tests passed because of the I think we should get rid of this line, it's quite dangerous when refactoring |
I added this to allow for 100% coverage without changing the code. I'm not a fan of code refactoring just to simplify testing. I need to have a look at this PR when I'm home. |
Please note that the purpose of this PR is not to facilitate testing, but to prepare the split of The main reason why this line exists is that we test private nested classes' public APIs. Once we split the code into multiple files, we'll be able to unit test each component public API directly, without decreasing today's coverage rate. |
Sorry, i misunderstood. I shall have a look on Saturday. |
f925060
to
22b4f53
Compare
It's weird, the |
Those macros are used to reduce template argument boilerplate
7e2a199
to
c2cef9c
Compare
c2cef9c
to
8585d35
Compare
Finally I made that pass \o/ @nlohmann If you could take a look before pushing other commits, it'd be great (rebasing is horrible with all the code moving) Also I won't be available for the next 2 weeks, so I can only make changes tonight (sorry for the rush :p) |
Sorry for changing to much lately. I kind of forgot what it means to pending PRs... |
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 to me.
Thanks a lot! We shall talk about the next steps after I come back of vacations (I'll be available on slack during that time anyway) The first thing should be quite trivial: splitting into multiple files, and add a cmake/makefile rule to amalgamate a single The second is more hard, it's about the API breakage (namespace naming, single traits class, etc...) as discussed in #474. I'll be happy to get on that issue when I come back! |
Have a nice vacation! |
Hi, I managed to move every nested struct/class present in
basic_json
to thedetail
namespace.Excepted
json_pointer
which is now innlohmann
, I don't know if input/output adapters are exposed, if so, I will move them there too.This is an intermediate refactoring, needed before splitting the library into multiple files, and before changing classes and namespace names.
I'm afraid the review will not be very interesting... I advise reviewers to look at each commit separately, it is not readable otherwise.