What are Nightlies?


Last Updated:

  1. Ngo93

    Ngo93 Well-Known Member This Topic's Starter

    Joined:
    Feb 24, 2010
    Messages:
    586
    Likes Received:
    39
    Can anyone explain to me what Nightlies are and how exactly do they work? Sorry if this is an obivous question but I couldn't really find anything on it ><
     

    Advertisement
  2. Bitbang3r

    Bitbang3r Well-Known Member

    Joined:
    Apr 24, 2010
    Messages:
    108
    Likes Received:
    24
    Many open-source projects do one build a day when they take all the code that's been checked in over the past 24 hours and attempt to build it into a single release. If a project is under active, aggressive development by lots of developers and does only a single daily build, it's common for those builds to fail unless everyone literally drops everything and bends over backwards for a day or three to MAKE it work. They're called "nightlies" because they tend to get built late at night... after everyone has finished for the day.

    The main purpose of them is to keep individual authors from allowing their own sub-projects to diverge so far away from the main code base that the main code base can no longer compile and build. To give a real-world example, this actually happened to Struts in early 2001. Basically, all the lead developers had their own areas of special interest, so they made their changes and compiled them against the jarfile from the last 1.0 release of Struts. The problem was, developer A's code built and ran fine... on *HIS PC*. Ditto, for the code of developers B, C, D, and E. Unfortunately, the moment you tried combining the code from two or more of them, things rapidly went down in flames, and you could barely get *anything* to compile due to all the broken cross-dependencies.

    Put another way, the general goal of daily builds is to make everyone aware whenever something causes a build to break, so the developers can fix it before the problem becomes so catastrophically bad, it becomes necessary to start pulling out a meat cleaver and just hack away new code to get the common code back into a state where it can build.
     
    dan330 and Ngo93 like this.
  3. Ngo93

    Ngo93 Well-Known Member This Topic's Starter

    Joined:
    Feb 24, 2010
    Messages:
    586
    Likes Received:
    39
    Oh wow, thank you for the explanation. These Nightlies though, they do make your phone run better right? At least until 1 of them breaks the ROM am I correct?
     
  4. Bitbang3r

    Bitbang3r Well-Known Member

    Joined:
    Apr 24, 2010
    Messages:
    108
    Likes Received:
    24
    Well, by "break" I don't mean "brick your phone". What I mean is that you have one (or more) scripts that are used to compile all of the files that make up the project. When something can't compile, anything that depends upon something that depends upon it can't be compiled, either. THAT's what a "break" is.

    In the context of an Android distro, a "daily" is basically a collection of all the changes that have been made since yesterday. The downside of a "daily rom" is that when two or more people are working independently on it, changes seem to introduce at least as many new bugs as they fix.

    The truth is, most successful development projects are either a one-man effort, or are fairly large and have a very dominant, very skilled leader who's good at project management (Linux, Cyanogen, etc) and exercises more or less total control over what ultimately goes into the official build. Where all hell breaks loose is when you have two or three people with loosely-defined, overlapping roles and nobody who's really in charge, because then they end up spending literally half their time (or more) cleaning up everything they accidentally caused to break in someone else's code.
     
  5. takeshi

    takeshi Well-Known Member

    Joined:
    Dec 6, 2009
    Messages:
    3,354
    Likes Received:
    281
    I wouldn't recommend operating with that assumption. Depends on the specific nightly you're talking about.
     

Share This Page

Loading...