mirror of
https://github.com/logos-co/logos-cpp-sdk.git
synced 2026-09-01 10:11:10 +00:00
fix: read dependency entries declared in object form
The manifest schema lets a dependency entry be an object carrying the name alongside the constraints an installer resolves it by, but every reader took the element as a plain string and skipped what came back empty, so an object entry disappeared: the module it names was left out of the generated LogosModules aggregate, and every call through it failed to compile. The rule lives in one place now, since the copies of it are how the gap spread. It ships in share/lidl-frontend alongside the parser that includes it, which consumers compile from there.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "impl_header_parser.h"
|
||||
|
||||
#include "metadata_dependencies.h"
|
||||
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QJsonDocument>
|
||||
@@ -393,8 +395,11 @@ ImplParseResult parseImplHeader(const QString& headerPath,
|
||||
result.module.description = obj.value("description").toString().toStdString();
|
||||
result.module.category = obj.value("category").toString().toStdString();
|
||||
QJsonArray deps = obj.value("dependencies").toArray();
|
||||
for (const QJsonValue& v : deps)
|
||||
result.module.depends.push_back(v.toString().toStdString());
|
||||
for (const QJsonValue& v : deps) {
|
||||
const QString depName = dependencyName(v);
|
||||
if (!depName.isEmpty())
|
||||
result.module.depends.push_back(depName.toStdString());
|
||||
}
|
||||
|
||||
// Read events declared in metadata.json
|
||||
QJsonArray events = obj.value("events").toArray();
|
||||
|
||||
Reference in New Issue
Block a user