mozbuild/backend/test -vs- common.py -- error reporting

NEW
Unassigned

Status

Firefox Build System
General
5 years ago
3 months ago

People

(Reporter: joey, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
python/mozbuild/mozbuild/test/common.py
=======================================
CONFIGS = {
  $var: {
     'defines': [],
     'non_global_defines': [],
     'substs': [],
  }
}


Structures in the common.py::CONFIG dictionary should either have default values supplied automatically for record fields.  Or sanity check the record list to verify all keys are present.

Adding new content for a variable conversion but omitting fields like 'substs' as not being needed can create a mildly cryptic error to track down.


ERROR: Ensure PREF_JS_EXPORTS is written out correctly.
Traceback (most recent call last):
  File "python/mozbuild/mozbuild/test/backend/test_recursivemake.py", line 181, in test_preferences_js
    env = self._consume('preferences_js', RecursiveMakeBackend)
  File "python/mozbuild/mozbuild/test/backend/common.py", line 105, in _consume
    env, objs = self._emit(name)
  File "python/mozbuild/mozbuild/test/backend/common.py", line 98, in _emit
    env = self._get_environment(name)
  File "python/mozbuild/mozbuild/test/backend/common.py", line 94, in _get_environment
    config['substs'].append(('top_srcdir', srcdir))
KeyError: u'substs'
(Reporter)

Comment 1

5 years ago
s/record fields/required fields/

Updated

3 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.