* feat: LIDL as the interface IR — --header-to-lidl frontend + --dep backend
Make the generator pivot around LIDL so every binding flows source -> LIDL ->
C++ (and a future Rust module plugs into the same backend via Rust -> LIDL):
- --header-to-lidl <impl.h> --impl-class X --metadata m.json -o out.lidl: the
standalone C++ frontend. Runs parseImplHeader -> lidlSerialize and emits ONLY
the <name>.lidl contract (no Qt glue/dispatch), so a module can publish a
cheap `lidl` artifact without compiling its plugin.
- --dep <name>=<lidl>: the LIDL backend for concrete dependencies. Reuses the
interface-wrapper path with BindMode::Static, emitting the name-baked
modules().<dep> wrapper from the dep's published LIDL. Deduped vs each other
and vs --interface names.
- generateInterfaceWrappers gains a BindMode param (default Bound); --interface
stays Bound, --dep is Static. parseInterfaceFlags generalized to
parseSpecFlags(args, flag) for both --interface and --dep.
The umbrella already emits a `<dep>` member per metadata dependency, so no
umbrella change is needed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* address review: strip leading '@' in --header-to-lidl paths; fix doc comment
- --header-to-lidl now strips a leading '@' from the header/metadata/output
path args (matches legacy_main; some build drivers pass @/abs/path).
- Remove the stale "bound wrapper" doc comment above generateInterfaceWrappers
(it now generates Static dep wrappers too via BindMode).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: dependency interfaces — runtime-bound typed wrappers
Turn a declared "interface" (a .lidl file or a pure-C++ header with a
logos_events: block) into a BOUND client wrapper: the target module name
is a constructor argument instead of a baked-in literal, so one interface
can be bound to any satisfying module at runtime.
- generator_lib: new BindMode { Static, Bound }. In Bound mode the ctor
takes (LogosAPI*, const QString& moduleName) and every invokeRemoteMethod*
/ ensureReplica routes through m_moduleName. Default Static leaves existing
name-baked output byte-for-byte unchanged.
- legacy/main.cpp: repeatable --interface <name>=<path>[=<impl_class>] flag,
consumed in --general-only. Parses .lidl via lidlParse and .h via
parseImplHeader, emits the bound <name>_api.{h,cpp}, and adds
bind_<name>(moduleName) factories (QString + std::string) to the
LogosModules umbrella. Also self-resolves local interface_dependencies
from metadata.json for non-nix builds.
- experimental/lidl_gen_client: same BindMode parity for the --lidl path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* address review: dedup and validate --interface specs
A repeated --interface <name>=... would emit duplicate #include and
bind_<name>(...) into logos_sdk.h and fail to compile; empty name/path were
silently accepted. Dedup the flag-derived specs by name and drop malformed
ones with an explanatory message on stderr. (Copilot review, PR #74.)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* parse adjacent method comments to populate description
* preserve line breaks in method descriptions
Join doc-comment lines with newlines instead of spaces (markers stripped,
leading/trailing blank lines dropped, interior blanks kept), and escape \n
when emitting the description into the generated getMethods(). Both codegen
paths updated; docs corrected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* don't count braces inside comment lines (impl-header parser)
A brace in a doc/line comment (e.g. `/// returns { ... }`) no longer affects
class-scope tracking, which previously could make the parser think the class
ended early and drop later declarations. Addresses review feedback on #70.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>