build(sdk): gate -Werror behind PJ_WARNINGS_AS_ERRORS + add Conan Center recipe#139
Merged
Conversation
…ter recipe Add the option PJ_WARNINGS_AS_ERRORS (default ON, so our own builds and CI are unchanged) and gate -Werror / /WX behind it. Third-party packaging — Conan Center's multi-compiler matrix in particular — sets it OFF so a not-yet-pinned compiler version cannot fail an otherwise-fine build on a new warning. wasm32 still never gets -Werror (unchanged). Stage the Conan Center Index recipe under packaging/conan-center-index/ (copy recipes/plotjuggler_sdk/ into a fork of conan-io/conan-center-index to submit): - all/conanfile.py: downloads the released tag tarball (no vendored sources), validate()s C++20 + compiler minimums, builds with PJ_WARNINGS_AS_ERRORS=OFF, strips the project-installed CMake config/targets (CCI re-derives them from package_info()) while keeping PjPluginManifest.cmake as a build module. - all/conandata.yml, config.yml: v0.14.0 source url + sha256 (placeholder tag; re-point at the release that ships the -Werror gate before submitting). - all/test_package/: minimal consumer that links libpj_base.a via parseNumber<double> to exercise real linkage, not just headers. - README.md: submission + local-test workflow, prerequisites, recurring cost. Verified: conan create with -s compiler.cppstd=20 succeeds (deps resolve from Conan Center; test_package links and runs); validate() rejects sub-C++20; packaged tree drops Config*/Targets* and keeps PjPluginManifest.cmake + both licenses. ./build.sh --debug && ./test.sh green (48/48). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d98e7fa to
e210966
Compare
Three verified correctness fixes to the staged CCI recipe (conanfile.py only; no change to the SDK build): - assert_throws: export PJ_ASSERT_THROWS as a `base` component define when the option is set. assert.hpp branches on it at the consumer's compile time and upstream marks it PUBLIC on pj_base; stripping the project CMake targets for CCI dropped it, so a package built to throw would hand consumers assert(). Verified: the generated consumer CMakeDeps data now carries `-DPJ_ASSERT_THROWS` on the base component. - MSVC: restore `/Zc:preprocessor` on the plugin_sdk component (via is_msvc). Upstream sets it INTERFACE on the dialog SDK target for PJ_DIALOG_PLUGIN's variadic macro; it was lost when the project targets were stripped. - fPIC: drop the option. Every static target hardcodes POSITION_INDEPENDENT_CODE ON upstream (plugins are dlopen'd shared objects), so fPIC was a no-op knob — CCI requires options to have an observable effect. Verified: `-o &:fPIC=False` now errors "option 'fPIC' doesn't exist". Not changed: the pre-gate v0.14.0 sha256 in conandata.yml stays a documented placeholder (re-point at a tag containing the PJ_WARNINGS_AS_ERRORS gate before submitting). README already carries no fPIC reference. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses the remaining Codex nit: the test_package linked only plugin_sdk and never touched plugin_host, so a mis-wired plugin_host lib list or missing `dl` system_lib would go uncaught. Now, when the package is built with_host (default), the consumer also links plotjuggler_sdk::plugin_host and constructs an empty PluginRuntimeCatalog — a disk-less, no-throw default ctor that lives in libpj_plugin_runtime_catalog.a and cascades the loader archives (and libdl) onto the link line. The test_package conanfile mirrors the tested package's with_host option into a TEST_WITH_HOST cache variable so `-o with_host=False` still builds (the plugin_host component does not exist there). Verified both matrix points: with_host=True links plugin_host and runs with no undefined references (proving the lib/syslib wiring); with_host=False builds and runs without it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Prepares the SDK for publication on Conan Center and stages the recipe.
Source change (one line of behavior): add
option(PJ_WARNINGS_AS_ERRORS ... ON)and gate-Werror//WXbehind it. Default is ON, so our own builds, CI, andbuild.share unchanged. Third-party packaging (Conan Center's multi-compiler build matrix in particular) sets it OFF so a not-yet-pinned compiler version cannot fail an otherwise-fine build on a new warning. wasm32 still never gets-Werror(unchanged).Recipe (staged, not consumed by our build):
packaging/conan-center-index/recipes/plotjuggler_sdk/— copy this tree into a fork ofconan-io/conan-center-indexto submit.all/conanfile.py— downloads the released tag tarball (no vendored sources),validate()s C++20 + compiler minimums, builds withPJ_WARNINGS_AS_ERRORS=OFF, and strips the project-installed CMake config/targets (CCI re-derives them frompackage_info()) while keepingPjPluginManifest.cmakeas a build module.all/conandata.yml,config.yml—v0.14.0url + sha256.all/test_package/— minimal consumer that linkslibpj_base.aviaparseNumber<double>to exercise real linkage, not just headers.README.md— submission + local-test workflow, prerequisites, recurring cost.Verification
conan create ... -s compiler.cppstd=20→ success;nlohmann_json/3.12.0,fmt/12.1.0,fast_float/8.1.0all resolve from Conan Center;test_packagelinks and runs.validate()correctly rejects sub-C++20 profiles.Config*/Targets*, keepsPjPluginManifest.cmake+ both licenses; all 8 archives present../build.sh --debug && ./test.sh→ 48/48 green (this branch, with default-WerrorON).Follow-ups (before the CCI PR — not in this PR)
-Werrorgate; re-pointconfig.yml/conandata.ymlat it + new sha256 (current0.14.0hash is the pre-gate tag).0.14.xvs1.0.0, per the SDK'spj.data_processors.v1→ 1.0.0 rule).with_host/assert_throwsoptions; confirm the compiler-minimum map.Release impact
No ABI/API change to installed headers. The new CMake option is additive with a behavior-preserving default → PATCH at most (the recipe itself ships no consumer-visible header change).
🤖 Generated with Claude Code