Closed Bug 1259960 Opened 9 years ago Closed 9 years ago

Make check_prog() more flexible

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(4 files)

No description provided.
While DummyFunction is descriptive of what the instances are (and they can't even be called), the various uses of isintance(obj, DummyFunction) are kind of confusing, especially when they are in moz.configure land (and this bug is about to add another one). Review commit: https://reviewboard.mozilla.org/r/42629/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/42629/
Attachment #8735176 - Flags: review?(cmanchester)
Attachment #8735177 - Flags: review?(cmanchester)
Attachment #8735178 - Flags: review?(cmanchester)
Attachment #8735179 - Flags: review?(cmanchester)
So far, we've been using the lowercase of the variable name, but it's not enough for some special cases. Those special cases could do their own business, but then, they'd have to duplicate 90% of check_prog, which is less desirable. Review commit: https://reviewboard.mozilla.org/r/42631/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/42631/
Notes for the reviewer: - this needs bug 1257516 applied first. - the use-cases for the extra flexibility are actually in the unit test.
Blocks: 1260066
Comment on attachment 8735176 [details] MozReview Request: Bug 1259960 - s/DummyFunction/DependsFunction/. r?chmanchester https://reviewboard.mozilla.org/r/42629/#review39229
Attachment #8735176 - Flags: review?(cmanchester) → review+
Comment on attachment 8735177 [details] MozReview Request: Bug 1259960 - Allow to pass a string to check_prog to describe what is being looked for. r?chmanchester https://reviewboard.mozilla.org/r/42631/#review39231 ::: build/moz.configure/checks.configure:81 (Diff revision 1) > # will look for 'a' or 'b' in $PATH, and set_config PROG to the one > # it can find. If PROG is already set from the environment or command line, This part of the comment isn't grammatical anymore. "This will look for..."
Attachment #8735177 - Flags: review?(cmanchester) → review+
Attachment #8735178 - Flags: review?(cmanchester) → review+
Comment on attachment 8735178 [details] MozReview Request: Bug 1259960 - Make check_prog more flexible about the input it receives. r?chmanchester https://reviewboard.mozilla.org/r/42633/#review39235 ::: build/moz.configure/checks.configure:107 (Diff revision 1) > - option(env=var, nargs=1, > + option(env=var, nargs=1, > - help='Path to %s' % (what or 'the %s program' % var.lower())) > + help='Path to %s' % (what or 'the %s program' % var.lower())) This becomes awkward, because specifying `input` changes the meaning of `var` a lot: if someone does `check_prog('PROG', ('a', 'b'), input='--with-prog')`, they might be surprised they don't get the ability to set this from the environment for free. If we consider check_prog a mostly build-system internal thing this is fine, but it should be called out in the comment for check_prog.
https://reviewboard.mozilla.org/r/42633/#review39235 > This becomes awkward, because specifying `input` changes the meaning of `var` a lot: if someone does `check_prog('PROG', ('a', 'b'), input='--with-prog')`, they might be surprised they don't get the ability to set this from the environment for free. > > If we consider check_prog a mostly build-system internal thing this is fine, but it should be called out in the comment for check_prog. Oh, I see it is mentioned in the comment. Nevermind.
Attachment #8735179 - Flags: review?(cmanchester) → review+
Comment on attachment 8735179 [details] MozReview Request: Bug 1259960 - Make check_prog more flexible about the list of programs it will check. r?chmanchester https://reviewboard.mozilla.org/r/42635/#review39239
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: