diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71c8b22..ecaa5ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,12 +55,14 @@ jobs: # The runner is the shared `doctest` CLI, invoked directly via its flake # (github:logos-co/logos-doctest). The flake bundles Python + PyYAML # (+ rich), so no pip install step is needed. - - name: Test - UI chain + Composing Modules (C Library tutorial pulled in via requires) + - name: Test - UI chain + Composing Modules + Dependency Interfaces (C Library tutorial pulled in via requires) run: | - # Two leaves, run back-to-back into one report: + # Three leaves, run back-to-back into one report: # - tutorial-cpp-ui-app: the Part 1 -> 2 -> 3 chain (requires:) # - tutorial-composing-modules: the calc_aggregator core module # (requires Part 1 only) + # - tutorial-interface-dependencies: the calc_via_interface module + # binding a calculator interface at runtime (requires Part 1 only) # --continue-on-fail so the run walks every step and the published # report is complete. The job still fails (non-zero exit) if any step # failed; this only changes whether we stop early. diff --git a/tests/tutorial-interface-dependencies.test.yaml b/tests/tutorial-interface-dependencies.test.yaml index c4b120c..f540c93 100644 --- a/tests/tutorial-interface-dependencies.test.yaml +++ b/tests/tutorial-interface-dependencies.test.yaml @@ -85,6 +85,10 @@ sections: #include #include + // Defines the `logos_events` token (expands to `public`) so this + // header is valid C++ on its own, not only as generator input. + #include + class ICalculator { public: int64_t add(int64_t a, int64_t b); @@ -100,7 +104,7 @@ sections: post_text: | A few things to notice: - - The class name (`ICalculator`) and method signatures are all the generator needs. There is no `#include` of any module, no `LogosAPI`, no Qt. + - The class name (`ICalculator`) and method signatures are all the generator needs — no `LogosAPI`, no Qt, no reference to any concrete module. The one include (`logos_module_context.h`) just defines the `logos_events` token so the header is valid C++ on its own. - `logos_events:` (like Qt's `signals:`) marks event declarations. The generator turns each into a typed `on(callback)` subscriber on the bound wrapper. - You could write the exact same contract as a `.lidl` file instead — `interfaces/calculator.lidl` with `method add(a: int, b: int) -> int` … `event versionReady(version: tstr)`. The `.h` form is shown here because it matches a universal module's own language.