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:
osmaczko
2026-07-31 01:41:26 +02:00
parent 8e7ed6e0ec
commit 0ad68c252e
6 changed files with 82 additions and 16 deletions
@@ -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();