Skip to content
  • Mike Hommey's avatar
    2fddbb74
    Bug 1840537 - Enable value checking in moz.build for CONFIG variables derived... · 2fddbb74
    Mike Hommey authored
    Bug 1840537 - Enable value checking in moz.build for CONFIG variables derived from target.*. r=firefox-build-system-reviewers,andi,sergesanspaille
    
    This makes the types from mozbuild.configure.constants repr()-able, and
    repr()-ed in config.status, which, when processing moz.build, translates
    into value checking for comparison tests involving the variables.
    
    To make them pickable, though, we replace the use of EnumString.subclass
    with actual subclassing, which is a little less convenient, but avoids
    having to figure out how to make the classes EnumString.subclass creates
    pickable.
    
    This caught some mismatches in media/libpng and third_party/libsrtp.
    
    This also means we don't need to normalize the config before dumping it
    in config.status, because the only types that this was actually useful
    for are these (historically, we'd also turn byte strings into unicode
    strings but that hasn't been a thing for 4 years ; the special treatment
    of dicts and iterables was there to apply the normalization recursively,
    not to normalize dicts and iterables themselves). We still normalization
    before passing values to gyp, though.
    
    Differential Revision: https://phabricator.services.mozilla.com/D182141
    2fddbb74
    Bug 1840537 - Enable value checking in moz.build for CONFIG variables derived...
    Mike Hommey authored
    Bug 1840537 - Enable value checking in moz.build for CONFIG variables derived from target.*. r=firefox-build-system-reviewers,andi,sergesanspaille
    
    This makes the types from mozbuild.configure.constants repr()-able, and
    repr()-ed in config.status, which, when processing moz.build, translates
    into value checking for comparison tests involving the variables.
    
    To make them pickable, though, we replace the use of EnumString.subclass
    with actual subclassing, which is a little less convenient, but avoids
    having to figure out how to make the classes EnumString.subclass creates
    pickable.
    
    This caught some mismatches in media/libpng and third_party/libsrtp.
    
    This also means we don't need to normalize the config before dumping it
    in config.status, because the only types that this was actually useful
    for are these (historically, we'd also turn byte strings into unicode
    strings but that hasn't been a thing for 4 years ; the special treatment
    of dicts and iterables was there to apply the normalization recursively,
    not to normalize dicts and iterables themselves). We still normalization
    before passing values to gyp, though.
    
    Differential Revision: https://phabricator.services.mozilla.com/D182141
Loading