8 ms·
Gecko is already dependent on a lot of things so adding Rust might not be that big of a change, but IMHO a long and large list of dependencies and complex build
by userbinator 10y ago
Gecko is already dependent on a lot of things so adding Rust might not be that big of a change, but IMHO a long and large list of dependencies and complex build processes are what can really put off those wanting to contribute to browsers (among other software) by fixing bugs or whatever else. I have personally experienced a few times where it was easier and faster to just patch the binary than figure out how to compile everything from source and go through the whole configure/install/etc process again.
Especially with browsers, which not everyone agrees on how they should be and desires to customise, only to find that the option to do so has been removed or a source change must be performed, is subsequently delighted to know that it's open-source so they should be able to do it easily, but then get overwhelmed and give up after they realise the effort needed just to build an unmodified version of the software themselves. They then fall back to merely complaining on the Internet, and reluctantly accepting their "fate"... somehow, I feel like some of the visions of open-source didn't quite turn out as well as hoped.
- pawadu 10y agoWe call this the OpenOffice syndrome
- slacka 10y agoI guess you haven't built it a decade or so(if ever). It's literally this easy to build: $ git clone git://anongit.freedesktop.org/libreoffice/core $ apt-get build-dep libreoffice $ ./autogen.sh && make With any relatively standard Debian/Ubuntu distro, you can have your own custom build in about an hour or so. Progressive builds just a few min if you have ccache setup.
- cesarb 10y agoYeah, but that's LibreOffice. The other OpenOffice descendant (Apache OpenOffice) still uses the old build system, and is still very complicated to build as a result; just look how long it took for its developers to release the 4.1.3 version, which was a very minor patch release.
- fermigier 10y agoApache OpenOffice is on life support (at least, was in September, I wonder if the situation has evolved since): https://lwn.net/Articles/699047/ https://lwn.net/Articles/699047/
- banachtarski 10y agoAn hour is pretty awful for a word processor. I can build a fully modern 3D engine in half that time. edit: I noticed you typed make. Do you perhaps mean make -j 8 or something (depending on core count)
- IshKebab 10y agoI think that a word processor like OpenOffice is significantly more complicated than most 3D engines.
- dom0 10y agoIt might be more code, and it surely has a lot of tricky code and shit-to-maintain code (.doc import?!), but I very much doubt it's more complicated. That being said complicatedness has little to do with compile time now, has it? :)
- agentgt 10y ago> It might be more code, and it surely has a lot of tricky code and shit-to-maintain code (.doc import?!), but I very much doubt it's more complicated. There are some articles of Joel Spolsky explaning why office document formats are so complicated (not my word) [1]. The spec for MS doc is like 500 or so pages. The spec is longer than my video game graphics book I had in college. I recommend some research before assuming. > That being said complicatedness has little to do with compile time now, has it? :) Actually there is a correlation [2]. Of course it depends on what you call or think complexity is. Believe it or not engines may not actually be as complex because they typically are based on math formulas or combinations of simple algorithms. Math is often simple and doesn't require lots of branching (if conditions). The algorithms have to be fairly simple anyway otherwise performance would be bad. Buisiness software or actual video games on the other hand are full of branching. NetHack may not have 3D graphics or any graphics but it is an extremely complicated game. [1]: https://www.joelonsoftware.com/2008/02/19/why-are-the-microsoft-office-file-formats-so-complicated-and-some-workarounds/ https://www.joelonsoftware.com/2008/02/19/why-are-the-micros... [2]: https://en.wikipedia.org/wiki/Cyclomatic_complexity https://en.wikipedia.org/wiki/Cyclomatic_complexity
- Manishearth 10y agoThe user-facing build process for Gecko doesn't change as a result of this (or as a result of most build changes). It's pretty straightforward: mach bootstrap to fetch dependencies, mach build to build. Takes a while but that's not something that complicates the contributor experience; the build time is just annoying.
- weaksauce 10y agoUnless you are changing c/c++ code you can use artifact builds which download most of the compiled bits and integrate your front end changes. For me it changes a 1+hr build down to a <1min build. It's basically one line to add to a config file to enable it.
- Manishearth 10y agoYeah, I'm really happy that this happened! I've been wanting it for years, ever since I started poking at Firefox frontend (not C++) code. I actually had a proposal for a tool that would let you hack directly on your Firefox install without needing to download the full source (which is hard to do on flaky connections and annoying on slow ones). This is already possible, Firefox ships with a zip file (omni.ja) containing its UI code. The UI code is precompiled and cached, however you can edit the code and delete its cached form and stuff just works. It's a hack, but it makes it incredibly easy to just get started hacking on Firefox code. I could imagine there being an addon that helped smooth this process.
- hashhar 10y agoCould you point me to some resources? This really piqued my interest.
- Manishearth 10y agoFor omni.ja? http://inpursuitoflaziness.blogspot.com/2014/01/editing-files-from-omnija-in-firefox-20.html http://inpursuitoflaziness.blogspot.com/2014/01/editing-file... is something I wrote a few years ago. For more info about contributing to Firefox, see https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction https://developer.mozilla.org/en-US/docs/Mozilla/Developer_g...
- gcp 10y agoThis is ironically something that rust (and cargo) solve, isn't it? That said, what you describe isn't really an issue with Firefox. Unless you're running a very odd distro, apt-get build-dep or mach bootstrap will set you up automatically, and on Windows there's an installer with the dependencies (outside MSVC). Of coure, the people who like to customize to no end might be those running an odd distro, but something something digging yourself out of your own hole.
- toni 10y agoYou know, if the way you wrote your comment wasn't that much condensing, the people who like to customize to no end might learn from it.
- gcp 10y agoHuh? My point was that if you changed your environment you probably understand what changes broke the automation and are able to fix it yourself.
- toni 10y agoYou gave some pretty great tips for using right tools, but (at least for me)it sounded like a grumpy nerd. You could write your comment without accusing tweakers of digging themselves out of their own hole and all that unnecessary tone. In that case it would have more power to teach people something new.
- reitanqild 10y agoHe was most likely aiming at someone like me and I'm totally OK with it. In fact I'm more scared by people trying to silence him/her.
- toni 10y agoThe grandparent was complaining about the complexity of building Firefox. Something that I truly sympathize with. I certainly didn't want to silence the parent, but tried to point out that having a much more helpful tone will reach his message much farther.
- necessity 10y agoUh, yes, it is a big change, Rust is huge. I for one am dropping this bloatware for a WebKit browser once the changes hit Gentoo.
- gcp 10y agoDo you realize this is a build-time, not run-time dependency?
- loudmax 10y agoDo you realize that Gentoo packages are distributed by source code rather than pre-built binaries?
- SSLy 10y agoExcept there are -bin packages there.
- Manishearth 10y agoFWIW last I checked Chromium took way more time and RAM to build for the first time from source. This was many years ago.
- shakna 10y agoV8 seems a bit more bloated to me than what comes bundled with Firefox.
- Matthias247 10y agoMaybe yes, maybe no. But Webkit doesn't use V8 anyway :)
- shakna 10y agoTrue, I may have assumed they meant Blink, and something something Chromium, which breaking away from V8 isn't particularly easy, even if one is the CSS engine, and the other the JS engine. Sorry for leaping to conclusions. But they may have meant Midori or similar which actually uses WebKit, through WebKitGTK+... Which means linking against GTK+, probably GTK+3 to get the main benefits like single-page not whole application crashing. Which depending on your custom build, may or may not be an absolutely huge overhead. It could be a tiny change to add to an OS. Or huge.
- cryptarch 10y agoHow far do you think something like Docker/Vagrant build images would go to solve that problem? I imagine an image with the full toolchain installed, geared towards using it as a kind of "firefox-compiler" CLI (so coupled with a few shell scripts), that only requires you to know how to install Docker|Vagrant. This could easily be bundled with the source code.
- annnnd 10y agoMy thoughts exactly. Whenever I tinker with some new software I try to do it in a Docker container (writing all relevant commands to Dockerfile) so I can remove the changes easily when I want to.
- lmm 10y agoI think that would be more overhead, at least to the kind of people who have the native-code experience to be able to contribute to Firefox. (As more of the browser becomes Rust-based it will hopefully be more accessible for contribution, but once you're in the Rust world Cargo solves your problem a lot better than Docker does). And what do you do about the people left behind by Docker's extremely limited platform support?
- vidarh 10y agoA Dockerfile is basically a set of instructions to run to produce a working image. Nothing prevents you from running those instructions outside of Docker. And nothing prevents you from structuring your Dockerfiles like: FROM suitable-base-image ADD ./install.sh /tmp RUN chmod a+rx /tmp/install.sh && /tmp/install.sh and write a script to install the dependencies that people can opt to run outside of Docker if they prefer. The point is not to take away peoples ability to pull together all of the dependencies on their own, but to make replicating the build environment trivial. Personally I don't want install scripts etc. polluting my server or laptop setups - I always spin up containers to run builds in these days, because it means I at the end have a repeatable description of how to set it up. But once someone has done that job once, it's silly for everyone else to have to repeat it.
- ben0x539 10y agoRust seems like somewhat of a strategical direction for Firefox, not just any old frivolous dependency like mng support, so I think not prioritizing the brevity of the dependency list is reasonable here. Have people traditionally been running their own modified browsers? Seems a bit scary given how you'd have to be on the ball to merge security fixes into your branch regularly.
- gcp 10y agoThere's a few forks that maintain the old UI that are popular, such as Pale Moon. They get security updates because the old ESR branches they're based on still get security patches from Mozilla. Of course, that feed of patches will stop at some point. Don't ask me what the contingency plan for those forks is...
- rebelwebmaster 10y agoIIRC, Pale Moon is based off a fork of ESR24, so they're already on their own for any security fix backports at this point.
- Dylan16807 10y agoI understand the impulse, but you can put the tabs back with a blob of CSS and leave the menus turned on and it's about the same. No need to use a fork for that.
- yeukhon 10y agoAlso adding NodeJS: * https://mykzilla.org/2016/12/01/mozilla-and-nodejs/ https://mykzilla.org/2016/12/01/mozilla-and-nodejs/ * https://mail.mozilla.org/pipermail/firefox-dev/2016-December/004863.html https://mail.mozilla.org/pipermail/firefox-dev/2016-December...
- rockdoe 10y ago1) It's a request for comment. 2) This isn't really nodejs as it's wrapping the existing JS engine. They're not adding V8.
- zimbatm 10y agoOne part of the solution might come from using Nix; The release engineering team has started using Nix in their build process. Once all dependencies are mapped in Nix it means you just need to install the tool itself and all the dependencies will get pulled automatically. It doesn't solve porting to new arch and platforms (especially Windows) so it's still a good idea to keep the number of dependencies down. But on any amd64 Linux it should be fine.
- fenollp 10y agoTime to implement this idea: Use open source projects' CI file to find which dependencies / commands are needed to compile / run the project. Run all this inside whichever container the CI system uses (circle & travis use only a few). The issue described will never be an issue again!
- witty_username 10y agoOr, apt basically.
- disordinary 10y agoI kind of think the opposite. A browser is probably the most technically challenging and complicated project out there, if you can't deal with dependencies then chances are your code will not be of sufficient quality to make it into the project that still makes up the whole. However, if it's split into a lot of dependencies then it's much more accessible because you can contribute to a smaller and more easily understood project. In this case it looks like you can contribute to one of the servo project packages and those changes will make it downstream into Firefox, that's great as Servo has a (relatively) small and easily understood code base!