Skip to content

Qt split: inject logos-qt-sdk + logos-protocol, stamp logos_protocol_version into module metadata#113

Merged
dlipicar merged 10 commits into
masterfrom
feat/qt-sdk-split
Jun 12, 2026
Merged

Qt split: inject logos-qt-sdk + logos-protocol, stamp logos_protocol_version into module metadata#113
dlipicar merged 10 commits into
masterfrom
feat/qt-sdk-split

Conversation

@dlipicar

Copy link
Copy Markdown
Contributor

Part of the logos-protocol extraction (phases 2–4). Stacked set — depends on:

What

The builder absorbs the SDK split so modules don't: builder-based modules keep full source-level compatibility and need only a flake.lock bump — no metadata.json, source, or flake.nix edits.

  • flake.nix: new inputs logos-protocol and logos-qt-sdk; lib/{default,mkLogosModule,buildCppPlugin}.nix inject logosQtSdk/logosProtocolPkg and export the three SDK roots to the module build (LOGOS_CPP_SDK_ROOT / LOGOS_QT_SDK_ROOT / LOGOS_PROTOCOL_ROOT).
  • Protocol-version stamp: the protocol semver is parsed from LOGOS_PROTOCOL_VERSION_STRING in logos_protocol.h (nix builtins.split — single source of truth, never minted) and lib/modulePreConfigure.nix jq-injects it as logos_protocol_version into metadata.json before moc embeds it. Every freshly built module carries the stamp in its Q_PLUGIN_METADATA, readable without loading (lm, lgx verify, lgpm info).
  • cmake/LogosModule.cmake synced from logos-plugin-qt's retargeted copy — this is the canonical copy modules actually include via $LOGOS_MODULE_BUILDER_ROOT.

Verification

  • capability_module built through the builder carries logos_protocol_version=0.1.0 in its embedded metadata (verified by inspecting the built binary).
  • Workspace-pinned check builds of the module fleet (capability/test-modules suites) pass with these inputs — results posted on the workspace PR.

🤖 Generated with Claude Code

- New inputs logos-protocol and logos-qt-sdk, injected into both build
  pipelines (mkLogosModule + buildCppPlugin): modules now link
  logos-qt-sdk (which chains logos-protocol) while the Qt-free
  logos-cpp-sdk provides the std headers + code generator.
- cmake/LogosModule.cmake synced with logos-plugin-qt's (it had
  drifted): three-root resolution (LOGOS_CPP_SDK_ROOT /
  LOGOS_QT_SDK_ROOT / LOGOS_PROTOCOL_ROOT), links
  logos-qt-sdk::logos_qt_sdk + logos-cpp-sdk::logos_headers.
- Protocol-version stamp: the logos-protocol semver (parsed from
  logos_protocol.h) is injected into each module's metadata.json before
  moc embeds it (modulePreConfigure.stampProtocolVersion, jq). liblogos
  reads it pre-load to decide compatibility; modules from older
  builders lack the field and load as legacy.

Builder-based modules need only a flake.lock bump — no metadata.json or
source changes.
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

📊 External-library doc-test report

The four ways to wrap a C library — each scaffolded into a real module, built against this commit, loaded in logoscore, and called — rendered alongside the commands actually run and their output (updated each run, commit 08ad0ce):

Pages can take a minute to update after the run finishes.

The previous commit synced this file from logos-plugin-qt's lineage, which
silently dropped master-only blocks the universal-module path depends on:
the generated_code/ glob (compiles the generated glue + provider dispatch
into the plugin), the metadata.json configure_file for AUTOMOC, the
LOGOS_API_STYLE selection, static-archive external libs, and the Go/cgo
whole-archive block. Universal modules built without any Qt-plugin glue
(no QTMETADATA) and capability_module dlopen-failed on a missing impl
vtable, killing the token flow and with it all cross-module IPC.

This restores master's file and re-applies only the qt-split changes:
logos_module_context.h detection for the Qt-free base SDK, qt-sdk/protocol
root resolution, qt-sdk source-layout sources, the split include dirs, and
exported-target linking (logos-qt-sdk::logos_qt_sdk / logos-protocol /
logos-cpp-sdk::logos_headers).

Verified: logos-test-modules--tests check passes end-to-end with this
builder (universal modules load, capability token flow works, IPC green).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dlipicar

Copy link
Copy Markdown
Contributor Author

Follow-up commit 59983c0: the original cmake/LogosModule.cmake change was synced from logos-plugin-qt's lineage, which silently dropped master-only blocks the universal-module path depends on (generated_code/ glob, metadata.json configure_file for AUTOMOC, LOGOS_API_STYLE, static-archive externals, Go/cgo whole-archive). Universal modules built with no Qt-plugin glue at all (no QTMETADATA), and capability_module dlopen-failed on a missing impl vtable — which took the token flow down and with it every cross-module IPC call in the integration gate.

The file is now master's copy + only the surgical qt-split changes (three-root resolution, qt-sdk source list, split include dirs, exported-target linking). Verified: the logos-test-modules--tests workspace check passes end-to-end with this builder (universal modules load, capability token flow works, IPC green); full six-suite gate results land on the workspace PR.

Temporary — drop when the chain PRs merge (re-lock against masters).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dlipicar and others added 3 commits June 10, 2026 16:18
logos-test-framework's LogosTest.cmake now resolves three SDK roots
(qt split); the test builder passes -DLOGOS_QT_SDK_ROOT /
-DLOGOS_PROTOCOL_ROOT and the packages on buildInputs. flake.lock pins
logos-test-framework to its qt-split branch (logos-co/logos-test-framework#4)
— temporary, drop when the chain merges.

Verified: the test-framework-integration check passes locally with these
changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…sts import

mkLogosModuleTests.nix gained required logos-protocol/logos-qt-sdk args
in b24c2b0, but only lib/default.nix's import was updated — the second
import inside mkLogosModule.nix (the per-module auto-tests path) still
passed the old arg set, failing evaluation for any module flake whose
checks go through mkLogosModule with this builder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Same class as the mkLogosModuleTests fix: mkLogosQmlModule's own
buildCppPlugin import (and default.nix's pass-through to it) dropped the
new args, so every ui_qml module evaluated with logos-protocol = null
('expected a set but found null' at buildCppPlugin.nix:124) — breaking
basecamp's plugins and the basecamp/tutorial doctests under the chain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dlipicar added 4 commits June 12, 2026 09:46
The PR was CONFLICTING on GitHub, which suppresses all pull_request CI
runs. flake.lock: ours (the extraction-chain pins) + nix flake lock.
@dlipicar dlipicar merged commit 33bcd1c into master Jun 12, 2026
4 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.

1 participant