mirror of
https://github.com/logos-co/logos-cpp-sdk.git
synced 2026-08-31 01:31:10 +00:00
feat: cpp-generator consumes logos-lidl; delete embedded frontend (#89)
* feat: cpp-generator consumes logos-lidl; delete embedded frontend The canonical LIDL frontend now lives in logos-lidl. cpp-generator links it and keeps only the C++/Qt-specific parts (impl-header parsing, the gen_client/ gen_cdylib backends, the Qt type-name mapping). - Delete the embedded lidl_lexer/parser/serializer/validator/ast. - Add experimental/lidl_compat.h: brings logos-lidl's std AST into the global scope the backends use (via `using`), a qs() std::string→QString helper, a QTextStream<<std::string overload, and name-compatible shims (lidlParse/ lidlSerialize/lidlValidate) so the emission code keeps compiling. - Re-point impl_header_parser, lidl_gen_client (+ Doxygen /// docs on the generated client methods), lidl_gen_cdylib, lidl_emit_common, and legacy/ main at lidl::ModuleDecl. - CMake: C++17 + find_package(logos-lidl) + link logos-lidl::logos_lidl. - bin.nix: distribute only the shared C++/Qt backend helpers (compat + impl_header_parser + emit_common) under share/lidl-frontend, not the frontend. - tests: drop the 4 frontend test files (covered by logos-lidl now); the backend tests link logos-lidl. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: pin logos-lidl to the C-ABI commit + lock it The logos-lidl input was declared in flake.nix but missing from flake.lock, so override chains that don't reach the nested input (the doctest harness building a scaffolded module) couldn't resolve it. Pin the branch rev and lock it so the component is self-contained. Re-point at master once logos-lidl lands. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: re-point logos-lidl to merged master (#5) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
676154070c
commit
1bc101df1f
+11
-12
@@ -1,8 +1,7 @@
|
||||
#include "legacy/legacy_main.h"
|
||||
#include "experimental/lidl_gen_client.h"
|
||||
#include "experimental/lidl_gen_cdylib.h"
|
||||
#include "experimental/lidl_parser.h"
|
||||
#include "experimental/lidl_serializer.h"
|
||||
#include "experimental/lidl_compat.h"
|
||||
#include "experimental/impl_header_parser.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -80,9 +79,9 @@ int main(int argc, char* argv[])
|
||||
} else if (outDirIdx != -1 && outDirIdx + 1 < args.size()) {
|
||||
const QString d = stripAt(args.at(outDirIdx + 1));
|
||||
QDir().mkpath(d);
|
||||
outPath = QDir(d).filePath(mod.name + ".lidl");
|
||||
outPath = QDir(d).filePath(qs(mod.name) + ".lidl");
|
||||
} else {
|
||||
outPath = mod.name + ".lidl";
|
||||
outPath = qs(mod.name) + ".lidl";
|
||||
}
|
||||
|
||||
QFile f(outPath);
|
||||
@@ -173,12 +172,12 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
struct Out { QString file; QString content; };
|
||||
QList<Out> outs;
|
||||
outs.append({mod.name + "_module_impl.cpp",
|
||||
outs.append({qs(mod.name) + "_module_impl.cpp",
|
||||
lidlMakeModuleImplExports(mod, implClass, implHeader)});
|
||||
if (!mod.events.isEmpty())
|
||||
outs.append({mod.name + "_events_cdylib.cpp",
|
||||
if (!mod.events.empty())
|
||||
outs.append({qs(mod.name) + "_events_cdylib.cpp",
|
||||
lidlMakeEventsSourceCdylib(mod, implClass, implHeader)});
|
||||
outs.append({mod.name + ".lidl", lidlSerialize(mod)});
|
||||
outs.append({qs(mod.name) + ".lidl", lidlSerialize(mod)});
|
||||
for (const Out& o : outs) {
|
||||
const QString abs = QDir(genDirPath).filePath(o.file);
|
||||
QFile f(abs);
|
||||
@@ -274,11 +273,11 @@ int main(int argc, char* argv[])
|
||||
if (implHeaderIdx != -1 && implHeaderIdx + 1 < args.size())
|
||||
implHeader = args.at(implHeaderIdx + 1);
|
||||
else
|
||||
implHeader = mod.name + "_impl.h";
|
||||
outs.append({mod.name + "_module_impl.cpp",
|
||||
implHeader = qs(mod.name) + "_impl.h";
|
||||
outs.append({qs(mod.name) + "_module_impl.cpp",
|
||||
lidlMakeModuleImplExports(mod, implClass, implHeader)});
|
||||
if (!mod.events.isEmpty())
|
||||
outs.append({mod.name + "_events_cdylib.cpp",
|
||||
if (!mod.events.empty())
|
||||
outs.append({qs(mod.name) + "_events_cdylib.cpp",
|
||||
lidlMakeEventsSourceCdylib(mod, implClass, implHeader)});
|
||||
} else {
|
||||
err << "Error: the uniform cdylib Qt glue is generated by "
|
||||
|
||||
Reference in New Issue
Block a user