Closed Bug 1287023 Opened 8 years ago Closed 8 years ago

Allow to use delayed_getattr for option defaults

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
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+
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1665eb58981d
Allow to use delayed_getattr in more cases. r=chmanchester
https://hg.mozilla.org/mozilla-central/rev/1665eb58981d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: