Closed Bug 1565027 Opened 2 years ago Closed 2 years ago

Teach `mach browsertime` to tell you to `mach browsertime --setup` if we're not already set up

Categories

(Firefox Build System :: General, enhancement, P3)

All
macOS
enhancement

Tracking

(firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: mstange, Assigned: tarek, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(2 files)

Steps to reproduce (not sure which ones of these are necessary to reproduce the issue):

  1. I'm on macOS and have a copy of mach somewhere in my PATH.
  2. In my mozilla-central source directory (at /Users/mstange/code/mozilla/) I have a file called .mozconfig-opt for a Firefox desktop build which places the objdir for that build next to the source dir (not inside the source dir)
  3. Inside the objdir (at /Users/mstange/code/obj-m-opt/), I ran mach browsertime for the first time ever.
  4. I watched it install its things.

And then the script failed because it couldn't find the file tools/browsertime/node_modules/browsertime/bin/browsertime.js.
And indeed, in my source dir, there is no node_modules directory inside tools/browsertime/.

Attached file full log
Attachment #9077194 - Attachment mime type: application/octet-stream → text/plain

(In reply to Markus Stange [:mstange] from comment #0)

Steps to reproduce (not sure which ones of these are necessary to reproduce the issue):

  1. I'm on macOS and have a copy of mach somewhere in my PATH.
  2. In my mozilla-central source directory (at /Users/mstange/code/mozilla/) I have a file called .mozconfig-opt for a Firefox desktop build which places the objdir for that build next to the source dir (not inside the source dir)
  3. Inside the objdir (at /Users/mstange/code/obj-m-opt/), I ran mach browsertime for the first time ever.

It will install some Python packages, but not the NPM modules. Run mach browsertime --setup (topsrcdir or topobjdir, should not matter). Witness $topsrcdir/tools/browsertime/node_modules being populated.

I'm going to morph this into "teach mach browsertime to tell you to set up when it's obvious you haven't".

Summary: `mach browsertime` doesn't work in my macOS environment → Teach `mach browsertime` to tell you to `mach browsertime --setup` if we're not already set up

Hah, I see! Yes, such a message would help, especially for people like me who apparently just run random commands without reading the instructions... I think I wasn't expecting to have to run a manual setup command because similar mach commands, such as mach talos-test, don't require a manual setup invocation either.

Mentor: brennie
Type: defect → enhancement
Keywords: good-first-bug
Priority: -- → P3
Assignee: nobody → tarek

Teach mach browsertime to tell you to mach browsertime --setup if we're not already set up

I am going to speed up the check by checking for the bt dir presence in the node modules, and spare the user an extra call to browsertime.js

Attachment #9120051 - Attachment description: Bug 1565027 - check browsertime node install → Bug 1565027 - check browsertime node install r=nalexander
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.