Closed Bug 1421792 Opened 2 years ago Closed 2 years ago

move --enable-trace-logging to moz.configure

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file)

No description provided.
Attachment #8933051 - Flags: review?(core-build-config-reviews)
Comment on attachment 8933051 [details] [diff] [review]
move --enable-trace-logging to moz.configure

Review of attachment 8933051 [details] [diff] [review]:
-----------------------------------------------------------------

Technically, this looks fine.  However, I see only one real use of ENABLE_TRACE_LOGGING (see https://searchfox.org/mozilla-central/search?q=ENABLE_TRACE_LOGGING&path=); we should cull that variable and just use JS_TRACE_LOGGING.  I suppose this could bite somebody, but the fix is easy enough, and we could email if we were really concerned.  (Deprecation code isn't worth the effort in my opinion.)
Attachment #8933051 - Flags: review?(core-build-config-reviews) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f9231cda92d8
move --enable-trace-logging to moz.configure; r=nalexander
Backout by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ed8eade7d0d1
Backout f9231cda92d8 on suspicion of causing inscrutable moz.configure lint errors; r=bustage
The error is inscrutable because of the wrapping in depends_if. I /think/ we could change the depends_if implementation to something like:

depends(foo, when=foo)

when there's only one argument to depends_if.

It also means you should actually be able to change your depends_if to depends(when=moz_debug)(lambda: True)
(In reply to Mike Hommey [:glandium] from comment #5)
> The error is inscrutable because of the wrapping in depends_if. I /think/ we
> could change the depends_if implementation to something like:
> 
> depends(foo, when=foo)
> 
> when there's only one argument to depends_if.

This breaks some other usages of @depends_if.

> It also means you should actually be able to change your depends_if to
> depends(when=moz_debug)(lambda: True)

But this works.

depends_if is more useful if you actually need more than the truthness of the option being enabled (because you get the value as an argument). With depends(when=...), you just pass a function/lambda with no arguments.

You can also change the depends_if in the set_config/set_define, but only the one for the option default is causing lint trouble.
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e92a30a9d52
move --enable-trace-logging to moz.configure; r=nalexander
Pushed with the depends(when=moz_debug) change.  Thanks for the debugging assistance, glandium!
https://hg.mozilla.org/mozilla-central/rev/9e92a30a9d52
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.