Closed Bug 1770991 Opened 3 years ago Closed 3 years ago

Bootstrap "Your choice" prompt is missing a space after the colon

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect

Tracking

(firefox-esr91 unaffected, firefox100 wontfix, firefox101 wontfix, firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox100 --- wontfix
firefox101 --- wontfix
firefox102 --- fixed

People

(Reporter: dholbert, Assigned: ahochheiden)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

STR:

  1. Run ./mach bootstrap
  2. At the "Please choose the version of Firefox you want to build", look at the prompt (and type some answer)

ACTUAL RESULTS:
The prompt Your choice: doesn't have a trailing space between the colon and your response. So e.g. if you type 2, you see Your choice:2

EXPECTED RESULTS:
Space after the colon, to match conventions around textual prompts (for sudo, apt, etc. just to name a few handy examples)

(For comparison/reference: at the very end of bootstrap, we show

Would you like to run a configuration wizard to ensure Mercurial is
optimally configured? (Yn):  

...with a space after the colon, as-expected.)

Attached image screenshot

Looks like this was a regression from bug 1690870, specifically this part:
https://hg.mozilla.org/mozilla-central/rev/ca89299f8203fb17254a5584c3bb7c19131cf0af#l1.28

-Your choice: """
+Your choice:
+""".strip()

If I revert that change, then I get expected-results here.

(I initially tried just adding a space after the :, but that doesn't help because strip explicitly trims trailing whitespace)

We do also have the same old Your choice: """ pattern elsewhere, too, e.g. here:
https://searchfox.org/mozilla-central/rev/1c391443f770eddc7cde9e52dba5ef50cc233c06/python/mozboot/mozboot/debian.py#26

This patch (introducing strip() here) was written by mhentges who's no longer active, and it doesn't look like he mentioned why this particular thing changed, unfortunately, so I'm not sure if there was a reason or if we can just revert it. Andi, you were reviewer - do you know if there was any reason for this change, or can we just revert it?

Flags: needinfo?(bpostelnicu)
Regressed by: 1690870

Alternately, we could keep things as they are and then explicitly concatenate a string with a single space character at the end, but that feels unnecessary/silly.

Set release status flags based on info from the regressing bug 1690870

Has Regression Range: --- → yes
Assignee: nobody → ahochheiden
Status: NEW → ASSIGNED

I think matching conventions (and being consistent) is the right call here. As you pointed out, there's https://searchfox.org/mozilla-central/source/python/mozboot/mozboot/base.py#586, as well as https://searchfox.org/mozilla-central/rev/1c391443f770eddc7cde9e52dba5ef50cc233c06/python/mozboot/mozboot/debian.py#26. So removing the .strip() and adding the space seems like the way to go.

Flags: needinfo?(bpostelnicu)
Attachment #9278430 - Attachment description: Bug 1770991 - Added an extra space and removed `.strip()` so that the spacing between the `./mach bootstrap` choice prompt and choice matches textual conventions r?#build → Bug 1770991 - Added an extra space and removed `.strip()` so that the spacing between the `./mach bootstrap` choice prompt and the choice input matches textual conventions r?#build
Pushed by ahochheiden@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d7d6fc84ab53 Added an extra space and removed `.strip()` so that the spacing between the `./mach bootstrap` choice prompt and the choice input matches textual conventions r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: