-
Notifications
You must be signed in to change notification settings - Fork 191
Z Intern FF Dev Setup Notes
Hi, if you google "firefox development setup" (or the like), it is likely that you may encounter more than one path to setting up a Firefox development environment. This post describes some troubleshooting tips and tricks for working with these instructions specifically:
First sticking point: running the following command gave a few errors
python bootstrap.py
1 one initial issue was a complaint about python folder rights; I think this was because the default python installation had been done as root and the script was trying to install files into a subfolder; I ended up doing chmod on the particular folder (recursively)
2 there was an error about openssl; this had to be troubleshot by reinstalling openssl (I used homebrew) and reinstalling python after
brew install openssl
brew install python
(during the python installation it was required to OK force overwriting the old python link; I believe this allowed the previous python installation to be overwritten)
At the point before running the first build, I got confused about the "mozconfig" file. It should be created at the root of the cloned source directory.
At the point when trying to run the source code build, I saw a bunch of warnings but decided to address the issue of missing rust installation (error towards the bottom)
after manually installing rust separately (using instructions from the error message), the build completed successfully. this first build took about 35min on a 2yr old macbook laptop. but I've noticed since then the builds generally do not take that long (depending on what section of the source code you are changing, like C++ vs JS).
After the build successfully completed, running the build went smoothly.
At this point, I needed to learn mercurial. These links help explain the commands you might use about 80% of the time:
https://www.mercurial-scm.org/wiki/TutorialFirstChange
Sample mercurial workflow
1 get latest source. Note: I didn't run this very frequently because the section of code I worked on was fairly modular
hg pull -u
2 make my code changes
3 make build
./mach build
4 run latest build
./mach run
5 run manual tests
6 run mochi tests
// this command will vary by which part of the code you are working on
./mach mochitest -f browser <path_to_test>
7 merge commits
hg histedit
(tip: use fold like s in git)
For more info: https://www.mercurial-scm.org/wiki/HisteditExtension Note: It is generally not required to include the changeset after "hg histedit"
Update final commit message:
Ex (<reviewer_handle> will vary and details will vary)
"Bug 1381545. Sends stylo prefs with Report Site Issue button click. r?:<reviewer_handle>"
8 make patch file
get the changeset
hg log browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm
9 create patch
hg export . -r <changeset> > <file_name>.patch
10 either make a request for feedback or at the end of feedback change requests make a request for review
In UI, select feedback > ?
In UI, enter the person's name to search (or bugzilla handle)
(tips)
fixing the latest commit https://stackoverflow.com/questions/8182858/mercurial-how-to-amend-the-last-commit