Open Bug 1159284 Opened 10 years ago Updated 3 years ago

Output from './mach build' tells user to run 'mach run' rather than './mach run'

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: selenamarie, Unassigned)

Details

The output you see at the end of a './mach build' includes: To view resource usage of the build, run |mach resource-usage|. To take your build for a test drive, run: |mach run| For more information on what to do now, see https://developer.mozilla.org/docs/Developer_Guide/So_You_Just_Built_Firefox If you've been using https://developer.mozilla.org/en-US/docs/Simple_Firefox_build, the docs direct you to run './mach run' but the above message might lead an unwary developer to run 'mach run'. This has the unfortunate side effect of causing a default shell user on Ubuntu to be instructed to install 'mach', a chroot utility. Then, when one attempts to execute 'mach run', it fails. A suggestion was to use argv[0] to populate the suggested next commands. Does that sound reasonable? Am I missing something crucial about the '|mach run|' syntax that implies a developer prepends './'?
We recommend developers install "mach" into their PATH. https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/mach#Adding_mach_to_your_shell%27s_search_path But this is probably not documented as well as it should be. I agree that argv[0] should be used in most cases. We should also have mach print a notice when argv[0] != 'mach', as we want to encourage people to have mach in PATH, as it results in more pleasant workflows.
(In reply to Gregory Szorc [:gps] from comment #1) > We should also have mach > print a notice when argv[0] != 'mach', as we want to encourage people to > have mach in PATH, as it results in more pleasant workflows. Awkwardly, sys.argv[0] gets changed when mach is in one's PATH. So, if I run 'mach' and I have installed it into /usr/local/bin/mach, the sys.argv[0] now is '/usr/local/bin/mach'. We could detect a relative path or a path that begins with '.' and print a notice. Does that seem reasonable?
Yeah, slurping for . makes sense.
well no it does not when building seamonkey it would need to say run mozilla/mach run so not quite so simple a change.
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.