<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Category: mozilla | defunct]]></title>
  <link href="http://www.less-broken.com/blog/categories/mozilla/atom.xml" rel="self"/>
  <link href="http://www.less-broken.com/"/>
  <updated>2013-01-25T22:03:06-08:00</updated>
  <id>http://www.less-broken.com/</id>
  <author>
    <name><![CDATA[Siddharth Agarwal]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[New version of ntfsutils]]></title>
    <link href="http://www.less-broken.com/blog/2013/01/new-version-of-ntfsutils.html"/>
    <updated>2013-01-25T22:30:00-08:00</updated>
    <id>http://www.less-broken.com/blog/2013/01/new-version-of-ntfsutils</id>
    <content type="html"><![CDATA[<p>I've released a new version of the <a href="http://pypi.python.org/pypi/ntfsutils/">ntfsutils library</a> for Python.</p>

<p>The small spin-off project from some work I did at Mozilla became far more
popular than I expected, netting over 600 downloads last year. Pretty neat!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Pymake has been enabled on Win32 Firefox builders]]></title>
    <link href="http://www.less-broken.com/blog/2012/09/pymake-on-builders.html"/>
    <updated>2012-09-01T07:30:00-07:00</updated>
    <id>http://www.less-broken.com/blog/2012/09/pymake-on-builders</id>
    <content type="html"><![CDATA[<p>[crossposting from mozilla.dev.platform; please continue the discussion there. <a href="https://groups.google.com/forum/?fromgroups=#!topic/mozilla.dev.platform/iupEOWZjHNc">Google Groups link</a>.]</p>

<p>As of yesterday, Pymake has been enabled on all Firefox Win32 builders. This includes mozilla-central, mozilla-inbound, try, and all project branches (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=787563">except elm</a>). Clobber build times (this includes Try builds!) should go down by 45 minutes to an hour, resulting in faster turnaround for developers and lower load on the infrastructure.</p>

<p>Pymake has now become the official way to build Firefox 18 and above on Windows. If you’re on Windows and you haven't moved to Pymake yet, you should: <a href="https://developer.mozilla.org/en-US/docs/pymake">it's really simple</a>. I recommend setting up an alias to the in-tree Pymake in your MSYS profile.</p>

<p>GNU Make will still work for now, but we won't have tier 1 continuous integration for it (at least for Firefox — Thunderbird's still on GNU Make, but I’m hoping to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=786516">switch those builds to Pymake</a> soon). <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=787655">Win64 builds are also on GNU Make right now</a>, but those aren't tier 1.</p>

<p>A few notes:</p>

<ul>
<li><p>If your project branch is seeing build failures on Windows:</p>

<ol>
<li>make sure you're tracking an up-to-date mozilla-central: the last couple of fixes landed earlier this week and more fixes will be coming down the line</li>
<li>try setting a clobber for Win32 builds on your branch.</li>
<li>ask in #developers or #pymake -- perhaps someone might be able to help you out</li>
<li>if all else fails, file a bug with releng similar to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=787563">this one</a>.</li>
</ol>
</li>
<li><p>While try builds are much faster now, we also lose the ability to build Firefox 15-17 on them. <strike>I spent a bit of time investigating workarounds but didn't get anywhere, unfortunately.</strike> <strong>Update 3/9:</strong> Simply add <a href="https://gist.github.com/3582912">this patch</a> to your queue before pushing to try.</p></li>
<li><p>This also means that you need to pushing an up-to-date mozilla-central to try, otherwise you <em>will</em> see failures on Windows.</p></li>
<li><p>One out of every 20 builds or so is failing with a strange error in dom/bindings/test -- this seems to be corruption caused by a race condition that isn't being properly handled somewhere but honestly shouldn't be happening in the first place. If you see an error in dom/bindings similar to <a href="https://tbpl.mozilla.org/php/getParsedLog.php?id=14886515&amp;tree=Mozilla-Inbound&amp;full=1">the one in this log</a>, please retrigger that build. The error's being tracked in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=787658">this bug</a>.</p></li>
</ul>


<p>I'd like to say thanks to everyone who helped push it over the finish line: ted, khuey, coop, gps, glandium, catlee, bsmedberg, bhearsum, and anyone else if I missed them (sorry!).</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Civilising global state, take 2]]></title>
    <link href="http://www.less-broken.com/blog/2012/08/uncivilised-global-state.html"/>
    <updated>2012-08-04T13:30:00-07:00</updated>
    <id>http://www.less-broken.com/blog/2012/08/uncivilised-global-state</id>
    <content type="html"><![CDATA[<p>A few months ago, I wrote a post about <a href="/blog/2012/05/civilising-global-state.html">sane global state</a> via parameters.
Now Racket has parameters, but most other languages don't. How important parameters are for a dynamic language
was driven home to me while working on getting the <a href="https://developer.mozilla.org/en-US/docs/pymake">Pymake</a>
build system working on our tinderboxes.</p>

<p>Pymake is a Python reimplementation of the venerable <a href="http://www.gnu.org/software/make/">GNU Make</a>, with two big advantages over it:</p>

<ol>
<li>Parallel GNU Make (at least the MSYS variant) is extremely buggy and prone to deadlocks on Windows, which means the only option is to run serially (<code>-j1</code>). Pymake doesn't have any issues, so build times are much faster on machines with enough cores.</li>
<li>The Mozilla build system uses recursive Make. Each recursive call spawns another Make process, and <a href="http://stackoverflow.com/questions/47845/why-is-creating-a-new-process-more-expensive-on-windows-than-linux">process spawning is rather expensive on Windows</a>. Pymake performs all its recursion within the same process, which speeds build times on Windows even further.</li>
</ol>


<p>Pymake also provides a few bonus features, one of which is the ability to run
Python files "natively", meaning within the same process. This helps speed up
builds even more by avoiding spawning extra Python processes. Of course, such
scripts have to be written with care to avoid trampling over Pymake itself.</p>

<p>One of the scripts for which this feature was enabled was <a href="https://mxr.mozilla.org/mozilla-central/source/config/pythonpath.py"><code>pythonpath.py</code></a>. By default, Python only loads modules from the current directory and its system directories. <code>pythonpath.py</code> lets us specify additional directories to load modules from. (Yes, <a href="http://www.virtualenv.org">virtualenv</a> is a much better solution, and we're going to switch to it soon.)</p>

<p>To do its work <code>pythonpath.py</code> must modify important global variables like <code>sys.argc</code> and <code>sys.argv</code>. Since it doesn't undo these modifications, it causes hard-to-debug problems down the line. To fix such issues, one would need to consider every eventuality: returns, exceptions, etc. Not only that, one might need to consider modifications by <em>others</em> as well.</p>

<p>As a result, we had to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=780241">disable this feature</a> for it, slowing down builds by a bit.</p>

<p>If those variables were parameters, one could simply wrap the modifications up in a <code>parameterize</code> and expect things to Just Work. Since everyone would be doing the same thing, things continue to Just Work no matter what is run.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Build System on BugsAhoy]]></title>
    <link href="http://www.less-broken.com/blog/2012/06/build-system-on-bugsahoy.html"/>
    <updated>2012-06-30T11:25:00-07:00</updated>
    <id>http://www.less-broken.com/blog/2012/06/build-system-on-bugsahoy</id>
    <content type="html"><![CDATA[<p><a href="http://www.joshmatthews.net/">Josh Matthews</a>' amazing
<a href="http://www.joshmatthews.net/bugsahoy/">BugsAhoy</a> now has support for the
build system. All open bugs labelled <code>[good first bug]</code> and with a listed
mentor in the Core::Build Config and MailNews Core::Build Config components
are listed. If you're interested in one of the bugs, post a comment there or
find us in <code>#pymake</code> on <code>irc.mozilla.org</code>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Assuming makes an ass out of everyone, or how Ruby's build system sucks]]></title>
    <link href="http://www.less-broken.com/blog/2012/05/rubys-build-system-sucks.html"/>
    <updated>2012-05-15T05:30:00-07:00</updated>
    <id>http://www.less-broken.com/blog/2012/05/rubys-build-system-sucks</id>
    <content type="html"><![CDATA[<p>At Mozilla, our build system has a firm rule we only grudgingly violate:
<em>explicit is better than implicit</em>. What that means is that if we depend on a
library <code>foo</code> and we don't find it on the machine we're building on, we <em>fail</em>
instead of silently <em>assuming</em> the user doesn't want to build in support for
<code>foo</code>. If the user really wants that, she would need to pass in a <code>--disable-foo</code>
configure flag saying so. This means we know exactly what we're shipping
as binaries, and users know exactly what to expect.</p>

<p>Once you spend a lot of time working with Mozilla code, you sometimes forget
other projects don't follow such obviously important rules. Case in point:
Ruby. A default Ubuntu install builds Ruby out of the box. Of course, when you
then try to do anything remotely useful:</p>

<pre><code>% gem install heroku
</code></pre>

<p>Ruby fails with a cryptic <code>no such file to load -- zlib (LoadError)</code>.</p>

<p>Turns out Ubuntu doesn't come with the <code>zlibg1</code> dev library, which means the
Ruby build system <em>assumes</em> you don't care about zlib support and happily builds
without it.</p>

<p>Great, so you installed the library and built Ruby again, and <code>gem</code> actually worked.
Now, you try to log in to Heroku:</p>

<pre><code>% heroku login
</code></pre>

<p>... and Ruby fails with yet another <code>no such file to load -- net/https</code> error.
At least the error message is slightly less cryptic this time, since it tells
you to <code>apt-get install libopenssl-ruby</code>. Which means you need to install the
library and rebuild Ruby a <em>third</em> time.</p>

<p>God knows how many more libraries the build system's <em>assumed</em> I don't care
about.</p>
]]></content>
  </entry>
  
</feed>
