Skip to content

#2495: Upgrade the json library to latest version - #2496

Merged
lifflander merged 6 commits into
developfrom
2495-upgrade-the-json-library-to-latest-version
Jul 9, 2026
Merged

#2495: Upgrade the json library to latest version#2496
lifflander merged 6 commits into
developfrom
2495-upgrade-the-json-library-to-latest-version

Conversation

@lifflander

Copy link
Copy Markdown
Collaborator

Fixes #2495

@lifflander lifflander linked an issue Nov 13, 2025 that may be closed by this pull request
3 tasks
@github-actions

Copy link
Copy Markdown

clang-format output for this changeset:

clang-format did not modify any files

@github-actions

github-actions Bot commented Nov 13, 2025

Copy link
Copy Markdown

Pipelines results

vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-ldms-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-gcc-14-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-18-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-16-vtk-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-13-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-14-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-gcc-12-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-11-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-cuda-11-4-3-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

/vt/src/vt/runtime/runtime.cc(1117): warning: parameter "comm" was declared but never referenced

/vt/src/vt/runtime/component/component_pack.impl.h(55): warning: parameter "seq" was declared but never referenced
          detected during:
            instantiation of "std::unique_ptr<T, std::default_delete<T>> vt::runtime::component::<unnamed>::tupleCons<T,Tuple>(Tuple &&) [with T=vt::arguments::ArgConfig, Tuple=std::tuple<std::unique_ptr<vt::arguments::ArgConfig, std::default_delete<vt::arguments::ArgConfig>>>]" 
(104): here
            instantiation of "vt::runtime::component::registry::AutoHandlerType vt::runtime::component::ComponentPack::registerComponent(T **, vt::runtime::component::BaseComponent::StartupDepsPack<StartupDeps...>, vt::runtime::component::BaseComponent::RuntimeDepsPack<RuntimeDeps...>, Cons &&...) [with T=vt::arguments::ArgConfig, StartupDeps=<>, RuntimeDeps=<>, Cons=<std::unique_ptr<vt::arguments::ArgConfig, std::default_delete<vt::arguments::ArgConfig>>>]" 
/vt/src/vt/runtime/runtime.cc(770): here

/vt/src/vt/runtime/component/component_pack.impl.h(55): warning: parameter "tup" was declared but never referenced
          detected during:
            instantiation of "std::unique_ptr<T, std::default_delete<T>> vt::runtime::component::<unnamed>::tupleConsImpl<T,Tuple,I...>(Tuple &&, std::index_sequence<I...>) [with T=vt::util::memory::MemoryUsage, Tuple=std::tuple<>, I=<>]" 
(64): here
            instantiation of "std::unique_ptr<T, std::default_delete<T>> vt::runtime::component::<unnamed>::tupleCons<T,Tuple>(Tuple &&) [with T=vt::util::memory::MemoryUsage, Tuple=std::tuple<>]" 
(104): here
            instantiation of "vt::runtime::component::registry::AutoHandlerType vt::runtime::component::ComponentPack::registerComponent(T **, vt::runtime::component::BaseComponent::StartupDepsPack<StartupDeps...>, vt::runtime::component::BaseComponent::RuntimeDepsPack<RuntimeDeps...>, Cons &&...) [with T=vt::util::memory::MemoryUsage, StartupDeps=<vt::ctx

 ==> And there is more. Read log. <==

View job log


vt-build-amd64-ubuntu-22-04-gcc-11-cpp

Build for 504b166 (2026-06-18 13:03:58 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-12-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-clang-9-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-alpine-3-16-clang-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-cuda-12-2-0-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

/vt/lib/fmt/include/fmt-vt/base.h(472): warning #128-D: loop is not reachable
    for (; n != 0; ++s1, ++s2, --n) {
    ^
          detected during:
            instantiation of "auto fmt::v11::detail::compare(const Char *, const Char *, std::size_t)->int [with Char=char]" at line 591
            instantiation of "auto fmt::v11::basic_string_view<Char>::compare(fmt::v11::basic_string_view<Char>) const->int [with Char=char]" at line 598
            instantiation of class "fmt::v11::basic_string_view<Char> [with Char=char]" at line 2621
            instantiation of "auto fmt::v11::basic_format_args<Context>::get_id(fmt::v11::basic_string_view<Char>) const->int [with Context=fmt::v11::context, Char=char]" at line 2664

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

/vt/lib/fmt/include/fmt-vt/format.h(2596): warning #2417-D: constexpr constructor calls non-constexpr function "fmt::v11::basic_memory_buffer<T, SIZE, Allocator>::basic_memory_buffer(const Allocator &) [with T=fmt::v11::detail::bigint::bigit, SIZE=32UL, Allocator=fmt::v11::detail::allocator<fmt::v11::detail::bigint::bigit>]"
    constexpr bigint() : exp_(0) {}
                                 ^

/vt/lib/fmt/include/fmt-vt/base.h(472): warning #128-D: loop is not reachable
    for (; n != 0; ++s1, ++s2, --n) {
    ^
          detected during:
            instantiation of "auto fmt::v11::detail::compare(const Char *, const Char *, std::size_t)->int [with Char=char]" at line 591
            instantiation of "auto fmt::v11::basic_string_view<Char>::compare(fmt::v11::basic_string_view<Char>) const->int [with Char=char]" at line 598
            instantiation of class "fmt::v11::basic_string_view<Char> [with Char=char]" at line 2621
            instantiation of "auto fmt::v11::basic_format_args<Context>::get_id(fmt::v11::basic_string_view<Char>) const->int [with Context=fmt::v11::context, Char=char]" at line 2664

Remark: The warnings can be suppressed with "-diag-suppress <warning-n

 ==> And there is more. Read log. <==

View job log


vt-build-amd64-ubuntu-24-04-gcc-13-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-gcc-12-vtk-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-17-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-22-04-clang-15-cpp-cxx20

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-clang-16-zoltan-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-9-cpp-docs

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-10-openmpi-cpp-spack

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-gcc-10-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-20-04-clang-10-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


vt-build-amd64-ubuntu-24-04-icpx-cpp

Build for 701893c (2026-07-08 07:02:19 UTC)

Compilation – successful

Testing – passed

View job log


@codecov

codecov Bot commented Nov 13, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.51%. Comparing base (4f678e1) to head (ced7828).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2496   +/-   ##
========================================
  Coverage    88.50%   88.51%           
========================================
  Files          728      728           
  Lines        31014    31015    +1     
========================================
+ Hits         27450    27453    +3     
+ Misses        3564     3562    -2     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codacy-production

codacy-production Bot commented Jun 18, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@antoinemeyer5

Copy link
Copy Markdown
Contributor

Observation

The DARMA-tasking/vt repository appears to vendor the whole upstream nlohmann/json project.

Upgrade the library to latest version (3.12.0).

Update Procedure

(1) Download Source code (zip) here:
https://github.com/nlohmann/json/releases/tag/v3.12.0

(2) Unzip.

(3) Copy those items:

/cmake
/include
/single_include
CMakeLists.txt
LICENSE.mit
README.md

(4) Paste/replace in vt/lib/json.

(5) Rename 2 folders:

  • from: include/nlohmann
  • to: include/nlohmann-vt
  • from: single_include/nlohmann
  • to: single_include/nlohmann-vt

(6) Change across all the code base:
- from: #include <nlohmann/
- to: #include <nlohmann-vt/

(7) Change file lib/json/CMakeLists.txt content:
- from: set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME})
- to: set(NLOHMANN_JSON_TARGET_NAME ${PROJECT_NAME}-vt)
- note: line 63 (in this version)

Notes

Across the code base, they have change [•••] namespace nlohmann { inline namespace vt [•••], with NLOHMANN_JSON_NAMESPACE_BEGIN. Then I think vt/scripts/add_vt_namespace_to_json_lib.sh is useless now. So I delete it.

Other changes in this PR

  • Update CMake minimum version in lib/EngFormat-Cpp
  • Update CMake minimum version in lib/yaml-cpp

@antoinemeyer5

antoinemeyer5 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

The check CI / bake (vt-build-amd64-ubuntu-20-04-icpx-cpp is failing after 17m, because Intel icpx is treating a warning (-Wtautological-constant-compare line 1292) in nlohmann-json (std::isnan(...) checks) as an error due to -Werror. The failure is in the dependency code rather than the VT changes in this PR.

How do you want to proceed, @lifflander?

@antoinemeyer5

antoinemeyer5 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Wait for DARMA-tasking/workflows#44 to be merge. It could fix the CI issue on vt-build-amd64-ubuntu-20-04-icpx-cpp by using ubuntu-24 with icpx 2023!

@antoinemeyer5
antoinemeyer5 marked this pull request as ready for review July 7, 2026 17:42
@antoinemeyer5 antoinemeyer5 changed the title 2495 upgrade the json library to latest version #2495: Upgrade the json library to latest version Jul 7, 2026
@antoinemeyer5
antoinemeyer5 requested a review from nlslatt July 9, 2026 18:04

@nlslatt nlslatt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@lifflander
lifflander merged commit 664fd0c into develop Jul 9, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade the json library to latest version

3 participants