Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builder-manifest: Report the index of the module with the missing name #506

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/builder-manifest.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ expand_modules (BuilderContext *context, GList *modules,
GList **expanded, GHashTable *names, GError **error)
{
GList *l;
gsize i = 1;

for (l = modules; l; l = l->next)
for (l = modules; l; l = l->next, i++)
{
BuilderModule *m = l->data;
GList *submodules = NULL;
Expand All @@ -246,11 +247,8 @@ expand_modules (BuilderContext *context, GList *modules,
name = builder_module_get_name (m);
if (name == NULL)
{
/* FIXME: We'd like to report *something* for the user
to locate the errornous module definition.
*/
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Module has no 'name' attribute set");
"The %lu. Module has no 'name' attribute set", i);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This phrasing is odd "The 3. Module has no...".

Maybe "Module (3) has no..."

However I have another concern which is that this isn't helpful for any manifest with submodules, as it will point you in the wrong place.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken the . after the number is the German equivalent of th in English.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hfiguiere Yeah, that's right I'm from Austria and we use the . over here.
Unfortunately, I'm pretty busy for the next month, and it will take some time until I can try to fix the problem with the submodules and the bad grammar.

return FALSE;
}
orig_name = name;
Expand Down