<snip>
> * More modular code that is presumably better tested >> > > This is incredibly important, and I'm thrilled that you agree. (For > example, Bug 773050 [1] and Bug 1229149 (not done) [2] track separating the > services code from Fennec proper. This is good for build times but also > good for our testing story.) > > However, for us, the true modular piece is GeckoView. I got interested in > this yesterday because I think it's eventually needed for Progressive Web > Apps and re-evaluated the situation. (See my prior evaluation in my old > post at > https://mail.mozilla.org/pipermail/mobile-firefox-dev/2014-February/000538.html.) > I am thrilled to say that we are **incredibly close** to being able to > separate the GeckoView Java code from the rest of Fennec. (The > intertwingling of JavaScript, how we package Gecko and the omnijar, and the > myriad assumptions and connections between GeckoView and Fennec, remain to > be tackled.) We have had Bug 1098129 [3] tracking this style of split for > a long time; I will update that ticket with my fresh evaluation and file a > few dependent tickets to get this moving. > In Bug 1258450 [1], I have updated the classycle definitions which help understand the layering of an existing codebase. I've also pushed a refactoring patch series for review. After that patch series, I get the dependencies at the end of this post. Read A -> B as saying that A (part of GeckoView) depends on B (part of Fennec); if we can remove these dependencies, we can cut the monolith at compile-time. This is significant because it: * reduces our code complexity -- we have more nicely layered architecture, which makes assigning responsibilities easier and makes information flow easier to assess; * reduces our compile time -- we can compile and dex independent pieces of the app in parallel; * paves the way to write tests against GeckoView -- in essence, replacing geckoview_example with functional tests; * paves the way to publishing GeckoView as a real AAR using Gradle. I'm thrilled to say that we're significantly closer to cutting the monolith than we were a year ago! (I don't really know how this happened: I think the work snorp, jchen, and perhaps kats have been pursuing has driven a better architecture, out of which falls naturally better compile-time divisions.) I have filed three tickets to track the remaining work: * Bug 1258464 [2] tracks removing currently unused functionality from GeckoView. To support GeckoView consumers, we'll need to grow it back in a Fennec-independent way. * Bug 1258470 [3] tracks making the graphics code not rely on Fennec's Tab/Tabs code but instead get graphics information in a less Fennec-specific way. * Bug 1258472 [4] tracks moving Fennec-specific things out of GeckoProfile. I have asked jchen to try to make [3] happen. I hope to work with mcomella and snorp to make the others happen. These are not simple tickets but contributions are welcome! Yours, Nick [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1258450 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1258464 [3] https://bugzilla.mozilla.org/show_bug.cgi?id=1258470 [4] https://bugzilla.mozilla.org/show_bug.cgi?id=1258472 After these refactorings, I get: nalexander@chocho ~/M/gecko> java -cp mobile/android/build/classycle/classycle-1.4.1.jar classycle.dependency.DependencyChecker -mergeInnerClasses -dependencies=@mobile/android/base/geckoview.ddf objdir-droid/gradle/build/mobile/android/app/intermediates/packaged/local/debug/classes.jar show onlyShortestPaths allResults Set [lib] has 133 classes. Set [app] has 715 classes. check [lib] independentOf [app] Unexpected dependencies found: org.mozilla.gecko.gfx.BitmapUtils -> org.mozilla.gecko.R -> org.mozilla.gecko.Tab -> org.mozilla.gecko.Tabs -> org.mozilla.gecko.ThumbnailHelper org.mozilla.gecko.GeckoProfile -> org.mozilla.gecko.GeckoApp -> org.mozilla.gecko.db.BrowserDB -> org.mozilla.gecko.distribution.Distribution -> org.mozilla.gecko.GuestSession -> org.mozilla.gecko.db.StubBrowserDB -> org.mozilla.gecko.TelemetryContract -> org.mozilla.gecko.Telemetry -> org.mozilla.gecko.db.LocalBrowserDB -> org.mozilla.gecko.preferences.DistroSharedPrefsImport org.mozilla.gecko.GeckoView -> org.mozilla.gecko.GeckoActivity -> org.mozilla.gecko.Tab -> org.mozilla.gecko.Tabs -> org.mozilla.gecko.R org.mozilla.gecko.gfx.LayerView -> org.mozilla.gecko.Tabs -> org.mozilla.gecko.Tab org.mozilla.gecko.gfx.JavaPanZoomController -> org.mozilla.gecko.Tab -> org.mozilla.gecko.Tabs org.mozilla.gecko.gfx.GeckoLayerClient -> org.mozilla.gecko.Tab -> org.mozilla.gecko.Tabs org.mozilla.gecko.gfx.TouchEventHandler -> org.mozilla.gecko.Tabs -> org.mozilla.gecko.Tab org.mozilla.gecko.gfx.LayerRenderer -> org.mozilla.gecko.Tabs -> org.mozilla.gecko.Tab
_______________________________________________ mobile-firefox-dev mailing list [email protected] https://mail.mozilla.org/listinfo/mobile-firefox-dev

