Commit Graph
4 Commits
Author SHA1 Message Date
Dario LipicarandClaude Opus 4.7 eb71a1aa90 feat: dependency interfaces — SDK code generator (bound wrappers) (#74)
* 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>
2026-06-05 20:44:43 -03:00
Dario LipicarandClaude Opus 4.8 760916e97b Parse method doc comments into per-method description (#70)
* 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>
2026-06-04 11:38:27 -03:00
Dario Lipicar 8bdbd13848 Extend universal modules with module context (#61)
* extend universal modules with module context

* implement module calls and events for universal modules

* pr comments
2026-05-19 12:49:15 -03:00
Iuri Matias d633575677 add IDL parser & generator (wip) (#33)
* add IDL parser & generator (wip)

* fix fixtures issues affecting tests

* fix fixtures issues affecting tests
2026-03-31 16:29:35 -04:00