Closed Bug 1287023 Opened 3 years ago Closed 3 years ago
Allow to use delayed
_getattr for option defaults
58 bytes, text/x-review-board-request
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/1665eb58981d Allow to use delayed_getattr in more cases. r=chmanchester
You need to log in before you can comment on or make changes to this bug.