Warn or issue error when recipe contains unrecognized variable
Bug #1166176 reported by
Adam Dingle
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bake |
Triaged
|
Medium
|
Unassigned |
Bug Description
I think Bake should issue a warning or error if a recipe contains a variable it doesn't recognize. For example, I mistakenly wrote a recipe containing the following:
programs.test {
source = foo.vala
}
Above, "source" should be "sources". When I ran bake, it ignored the "source" variable and simply did nothing. That was pretty confusing. If it had printed "warning: unknown variable 'source'" then I would have immediately realized what was wrong.
To post a comment you must log in.
A similar thing also happend to me.
Warnings are good, but maybe it should be possible to add some user defined vars without warnings.
For these vars there could be a prefix like e.g. 'user-*' or '_*'.