Closed Bug 1883924 Opened 1 year ago Closed 1 year ago

Bootstrap does not warn or stop despite Python version is not compatible with git-cinnabar

Categories

(Firefox Build System :: Bootstrap Configuration, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: cso, Unassigned)

Details

Bootstrap does not stop running despite git-cinnabar could not be installed. git-cinnabar is required for using git on Mozilla Central. The initial symptom is that the command python3 bootstrap.py –-vcs=git asks for Mercurial setup and git-cinnabar is not found in ~/.mozbuild.

The current git-cinnabar version isn't compatible with Python 3.10.4. I had Python 3.10.4 installed on my computer, but bootstrap does not interrupt and finishes with asking for Mercurial settings (not Git). After upgrading my Python installation to 3.12.2, the command python3 bootstrap.py –-vcs=git asks for git setup instead.

Here are the commands that I've run on the command line as a part of the setup for the Firefox development environment:

curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O
python3 bootstrap.py –-vcs=git

I wasn't able to reproduce. I realized I typed my python3 bootstrap.py --vcs=git command manually (instead of copying yours).

I re-ran the scenario copying your commands exactly and I got this error:

ahochheiden@Alex-Mozilla-P620 /d/mozilla-source
$ python3 bootstrap.py –-vcs=git
Mercurial is not installed. Mercurial is required to clone Firefox.
Hint: have you made sure that Mercurial is installed to a location in your PATH?

I was confused at first, so I suspected there was some hidden character in your provided string. I was on the right track, your two hypens preceeding vcs=git are not the same.

The first one is U+2013 : EN DASH (–)
The second one is U+002D : HYPHEN-MINUS (-)

They should both be U+002D : HYPHEN-MINUS (--)

I'm pretty sure that was the only problem. The bootstrap.py script never got the --vcs=git parameter, so it went ahead and did a mercurial install without you being aware. (It died immediately for me since my scenario was fresh and hg wasn't on path). I don't think Python 3.10.4 was involved at all.

It's unclear to me where your U+2013 : EN DASH character came from. I can't produce it on my keyboard with normal inputs. It's not in our docs either, only the correct version is:

U+2013 : EN DASH Searchfox query (–-vcs=git)
U+002D : HYPHEN-MINUS Searchfox query (--vcs=git) Correct version, finding all our docs

I don't think there's anything actionable to do here (or upstream in git-cinnabar).

I'll wait for you to confirm before closing as WORKSFORME.

Flags: needinfo?(cso)
Severity: -- → S4
Priority: -- → P5

😅🤦🏻‍♀️ After typing in the command manually, bootstrap could set up git successfully. Thank you for pointing out the different dash/hyphen/minus characters.

Flags: needinfo?(cso)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.