Add proper C++20 module support#4799
Add proper C++20 module support#4799nlohmann merged 23 commits intonlohmann:developfrom mikomikotaishi:develop
Conversation
|
The CI test for modules does not pass but I am afraid of making changes to the CI configuration that could break something. However, compiling the library manually seems to be fine, by just using |
|
@nlohmann Hi, so I believe I have addressed all of your concerns (at least the ones you have posted up to this point). Is there anything else you need me to address, and if not, can these changes now be merged? |
|
Please check the CI issues. |
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com> Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
I have re-signed my commits, but the |
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
|
@nlohmann Hi, so it seems that some of the tests (specifically ci_static_analysis_clang (ci_test_clang) and ci_cmake_options (ci_test_legacycomparison)) are failing due to files that I have not modified, and I do not know how to resolve these CI issues, as I have very little experience working with GitHub's CI system. If you have any idea what is happening, could you help with resolving those issues? I have tried to resolve specifically the CI test that corresponds to the changes I made (ci_module_cpp20 (silkeh/clang:latest)), however it takes almost 50 minutes for the GitHub CI to begin those tests. Regardless, I can confirm that the C++ modules function correctly when compiling myself. The steps I have taken are:
|
|
I will check tomorrow. |
|
I have a fix for |
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
|
Hmm, I had a look and I think I might understand what the issue was with the modules test, it appears I had to modify the test in |
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Rebased and addressed issues except for |
Co-authored-by: Niels Lohmann <niels.lohmann@gmail.com> Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
|
Changes made as requested |
nlohmann
left a comment
There was a problem hiding this comment.
Some comments which may stem from my little experience with modules.
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
Signed-off-by: Toyosatomimi no Miko <110693261+mikomikotaishi@users.noreply.github.com>
|
That should be all concerns addressed, also, I was thinking that potentially in the future if anything from namespace |
|
Is it ready to be merged? |
|
I need to review the CMake part once more. Please be patient. |
|
What did you think of the idea for the future of exporting implementation contents ( |
|
The detail namespace is not meant to be used by client code. It is allowed to be changed or removed between releases without warning. |
|
@nlohmann Hi, is this pull request still planned to be merged? |
|
I am traveling right now and will check this next week |
|
Understood, thanks for letting me know |
|
Thanks for the PR and the patience! |
|
Cheers! |
make amalgamate.This pull request adds proper support through CMake for a module for the nlohmann-json library, which is exported by the module
nlohmann.json. It also updates the existing test (created from this pull request) to use that module (the original name in that wasjson, howevernlohmann.jsonis probably a more appropriate name as it is less likely to cause naming conflicts). The module must be built usingNLOHMANN_JSON_BUILD_MODULESin CMake, and this is not enabled by default.I have also gone ahead to update the website and documentation to make note of this change.