Can't use booleans in set_config() or set_define()

RESOLVED FIXED in Firefox 48

Status

defect
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: glandium, Unassigned)

Tracking

(Blocks 1 bug)

unspecified
mozilla48
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

3 years ago
Adding, for instance set_define('SPIDERMONKEY_PROMISE', True) fails with:

 0:06.06 js/src>   File "./config.status", line 433, in <module>
 0:06.06 js/src>     "SPIDERMONKEY_PROMISE": true,
 0:06.06 js/src> NameError: name 'true' is not defined
The way we're writing config.status means everything we put in the config needs to JSON serialize to valid Python.

We could add a special case convert True to '1', or just have set_config or set_define with one argument mean the corresponding value ends up in the config as '1' to make this more convenient to write.
Reporter

Comment 2

3 years ago
I was thinking adding something like: true, false, null = True, False, None
Comment on attachment 8730943 [details]
MozReview Request: Bug 1254884 - Make JSON serialization to config.status more readable as python

https://reviewboard.mozilla.org/r/40257/#review36791

Sure.
Attachment #8730943 - Flags: review?(cmanchester) → review+

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c916fde5ebb3
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Reporter

Updated

3 years ago
Blocks: 1258618

Updated

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