Allow to use delayed_getattr for option defaults

RESOLVED FIXED in Firefox 50

Status

()

Core
Build Config
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

(Blocks: 1 bug)

unspecified
mozilla50
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox50 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

a year ago
Created attachment 8771226 [details]
Bug 1287023 - Allow to use delayed_getattr in more cases.

Until now, it's not been possible to do something as straightforward as:

option('--foo', default=delayed_getattr(milestone, 'is_nightly'))

The reason is that option's default needs what it's given, if it's a
@depends function, to depend on --help.

But we can't have every delayed_getattr add dependencies on --help,
because that would make unwanted things to depend on --help and run
when displaying the help.

Until we can totally remove --help dependencies, this change makes the
resulting @depends function created by delayed_getattr depend on --help
if the @depends function it's given already depends on --help.

Review commit: https://reviewboard.mozilla.org/r/64490/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/64490/
Attachment #8771226 - Flags: review?(cmanchester)
Comment on attachment 8771226 [details]
Bug 1287023 - Allow to use delayed_getattr in more cases.

https://reviewboard.mozilla.org/r/64490/#review61724

::: build/moz.configure/util.configure:150
(Diff revision 1)
> +    # Automatically add a dependency on --help when the given @depends
> +    # function.

This sentence looks incomplete.
Attachment #8771226 - Flags: review?(cmanchester) → review+

Comment 3

a year ago
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1665eb58981d
Allow to use delayed_getattr in more cases. r=chmanchester

Comment 4

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/1665eb58981d
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox50: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.