Closed Bug 1740123 Opened 2 years ago Closed 2 years ago

Allow invoking Mach outside of MozillaBuild

Categories

(Firefox Build System :: Mach Core, enhancement, P3)

All
Windows
enhancement

Tracking

(firefox97 fixed)

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: mhentges, Assigned: mhentges)

References

Details

Attachments

(2 files)

(this is a discussion ticket about a potential future for MozillaBuild).

The Firefox build depends on Linux-y tools (bash, perl, awk (I believe), etc).
Currently, these are provided in a MozillaBuild package (a little Mozilla-managed MSYS environment) that Windows devs manually install and keep up-to-date.
To work on Firefox, devs must use the MozillaBuild developer shell to interact with Mach.

This ticket proposes that Mach is changed to allow any shell to invoke Mach, so long as Mach is informed where $MOZILLABUILD is.

  • For example, from Powershell, you'd run the top-level mach file with Python directly
  • This means that Python will no longer (necessarily) run from a MSYS-y context (C:\... instead of /c/...)
  • This also would allow flexibility in choosing which Python version to run.
Priority: -- → P3
Summary: Internally manage MozillaBuild environment → Allow invoking Mach outside of MozillaBuild
See Also: → 1741960

Assuming that the MOZILLABUILD environment variable is set, allow
invoking Mach from non-MozillaBuild terminals.

Note that MozillaBuild still needs to be installed, and the
MOZILLABUILD environment variable will have to be set.

For future reference: when I tried setting this up with Windows
Store's Python 3.9, I encountered issues when running binaries installed
via pip: it would fail with abort: failed to load Python DLL python3x.dll.

Assignee: nobody → mhentges
Status: NEW → ASSIGNED

Move Python version check as early as possible so that more code can
safely depend on modern behaviour while out-of-date Python version still
get graceful error messages.

Without this change, Python 2 usages fail on importing importlib.util
before the nice warning is printed.

Depends on D133928

Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a6eabd95e31d
Move Python version check earlier r=ahal

Backed out 2 changesets (Bug 1725895, Bug 1740123) for causing build bustages.
Backout link
Push with failures
Failure Log

Flags: needinfo?(mhentges)
Flags: needinfo?(mhentges)
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a59de7ebeb2f
Move Python version check earlier r=ahal
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch

Need one more patch to land.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #9255612 - Attachment description: Bug 1740123: Allow invoking Mach outside of MozillaBuild → WIP: Bug 1740123: Allow invoking Mach outside of MozillaBuild
Attachment #9255612 - Attachment description: WIP: Bug 1740123: Allow invoking Mach outside of MozillaBuild → Bug 1740123: Allow invoking Mach outside of MozillaBuild
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4dfb129adabc
Allow invoking Mach outside of MozillaBuild r=glandium
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
OS: Unspecified → Windows
Hardware: Unspecified → All

For future readers of this bug, the docs for setting this up are available over here. Have fun!

See Also: → 1759256
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: