Skip to content

[jsonfusion] Update to 1.1.1 - #53259

Draft
Aleks Tuchkov (tucher) wants to merge 1 commit into
microsoft:masterfrom
tucher:jsonfusion-1.1.0
Draft

[jsonfusion] Update to 1.1.1#53259
Aleks Tuchkov (tucher) wants to merge 1 commit into
microsoft:masterfrom
tucher:jsonfusion-1.1.0

Conversation

@tucher

@tucher Aleks Tuchkov (tucher) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Updates the jsonfusion port to 1.1.1, which also addresses the review feedback on the earlier revision.

Review fixes

  • MSVC: upstream supports only GCC 14+ / Clang 20+, so added "supports": "!windows" (the __attribute__((noinline)) etc. do not compile with MSVC).
  • yyjson.hpp undeclared dependency: the optional backend headers are now #if __has_include(<...>)-guarded upstream (v1.1.1), so they are self-contained — installing/including them no longer requires the backend to be present; they compile to nothing without it. A yyjson feature pulls the yyjson dependency to activate JsonFusion/yyjson.hpp.
  • yaml.hpp includes nonexistent rapidyaml.hpp: same __has_include guard, so the installed header is safe (no-ops without rapidyaml). It is intentionally left unfeatured: the vcpkg ryml port ships a different include layout (<ryml/ryml.hpp>), so it can't satisfy this header cleanly.

Validation (arm64-osx)

  • format-manifest — no changes.
  • ./vcpkg install jsonfusion — SHA512 verified for v1.1.1; installed headers (including the guarded yaml.hpp / yyjson.hpp) compile standalone with no backend deps present.
  • ./vcpkg install jsonfusion[yyjson] — pulls yyjson@0.12.0; JsonFusion/yyjson.hpp compiles against it.

Header-only; boost-pfr dependency unchanged.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each downloaded file.
  • The version database is updated (x-add-version).
  • The installed package builds and can be used.

@BillyONeal Billy O'Neal (BillyONeal) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

GPT 5.6 reports:

Version 1.1.0 installs JsonFusion/yaml.hpp, which includes nonexistent rapidyaml.hpp.
The port advertises default MSVC configurations despite upstream supporting only GCC 14+ and Clang 20+. MSVC compilation fails on constructs such as __attribute__((noinline)).
The installed JsonFusion/yyjson.hpp requires undeclared yyjson.

@tucher Aleks Tuchkov (tucher) changed the title [jsonfusion] Update to 1.1.0 [jsonfusion] Update to 1.1.1 Aug 6, 2026
Comment thread ports/jsonfusion/portfile.cmake Outdated
# (3party is only used with JSONFUSION_FP_BACKEND=1, default is 0 with in-house implementation)
# Header-only. Install everything except the experimental 3party directory
# (only used with JSONFUSION_FP_BACKEND=1). The optional backend headers
# yaml.hpp and yyjson.hpp are #if __has_include-guarded, so they are

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unfortunately __has_include (as suggested in tucher/JsonFusion@1fda63a ) makes it an uncontrolled dependency; we need to patch the __has_include to be always false if we aren't providing the dependency. See https://learn.microsoft.com/vcpkg/contributing/maintainer-guide#when-defining-features-explicitly-control-dependencies

On the other hand it seems like a better fix would be to actually use/provide ryml? https://github.com/biojppm/rapidyaml/blob/master/src/ryml.hpp is named ryml.hpp not rapidyaml.hpp

@BillyONeal
Billy O'Neal (BillyONeal) marked this pull request as draft August 7, 2026 01:18
@tucher

Copy link
Copy Markdown
Contributor Author

Thanks — fixed in the latest push.

Controlled dependencies: the portfile now rewrites the __has_include guards to fixed values, so the optional backends are gated by this port's features rather than by whatever is on the include path:

  • yaml.hpp#if 0 (rapidyaml not provided by this port)
  • yyjson.hpp#if 1 with the yyjson feature, #if 0 without

No __has_include remains in those two headers. Validated locally: install jsonfusion and install jsonfusion[yyjson] both build and compile.

On ryml: the version in the vcpkg ryml port isn't the same rapidyaml version JsonFusion currently uses, so it isn't a drop-in. I've left the YAML backend disabled here for now; a proper [yaml] feature can be a follow-up.

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.

2 participants