Services/Sync/Getting Started: Difference between revisions

Jump to navigation Jump to search
(→‎Debugging Sync: Update logging information)
Line 48: Line 48:
== Building Sync ==
== Building Sync ==


The party line to rebuild the tree after making changes is to run:
Sync code is almost exclusively JavaScript, and so you probably should build using an artifact build, as described [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds here].


$ make -f client.mk
After setting this up, you'll do `mach build` to perform a build, `mach run` to run Firefox, and `mach xpcshell-test /services/sync/tests/unit` to run the sync unit test suite. There's also a separate end-to-end test suite, TPS, which is documented [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/TPS_Tests here]. (For most changes its sufficient you run the unit tests)
or from the object directory:
$ make -sj8


However, this is slow. If you have simply changed a JS file in ''services/sync/'', it is sufficient to run the following from your object directory:
Depending on your OS, most changes will not require a rebuild to take effect, only restarting and rerunning via `mach run`.
 
$ make -sj8 -C services/sync
 
The xpcshell tests will pick up changes immediately. However, if you launch Firefox, your changes '''won't''' be reflected. For that, you'll also need to rebuild the browser component:
 
$ make -sj8 -C services/sync && make -sj8 -C browser
 
A handy alias to have around is:
 
$ alias sync-launch make -sj8 -C services/sync && make -sj8 -C browser && dist/bin/firefox -no-remote -ProfileManager
 
Or, on OS X:
 
$ alias sync-launch make -sj8 -C services/sync && make -sj8 -C browser && dist/NightlyDebug.app/Contents/MacOS/ -no-remote -ProfileManager


= Using Bugzilla =
= Using Bugzilla =
8

edits

Navigation menu