Last Comment Bug 777231 - Skeleton for mozbuild package
: Skeleton for mozbuild package
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla17
Assigned To: Gregory Szorc [:gps] (away until 2017-03-20)
: Gregory Szorc [:gps] (away until 2017-03-20)
Depends on:
Blocks: mach
  Show dependency treegraph
Reported: 2012-07-24 21:41 PDT by Gregory Szorc [:gps] (away until 2017-03-20)
Modified: 2012-08-04 11:19 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

mozbuild skeleton, v1 (11.23 KB, patch)
2012-07-24 21:41 PDT, Gregory Szorc [:gps] (away until 2017-03-20)
vladimir: review+
k0scist: feedback+
Details | Diff | Splinter Review

Description User image Gregory Szorc [:gps] (away until 2017-03-20) 2012-07-24 21:41:04 PDT
Created attachment 645645 [details] [diff] [review]
mozbuild skeleton, v1

I'm splitting up the alternative frontend code into smaller chunks to make the review more manageable.

This is the first part. It adds a skeleton for a new Python package, mozbuild. This package will contain code for dealing with the build system.

The only module so far is the structured logging code. Read the README for info on how it works.

I would like to write tests for this... eventually. I started writing some tests, but ran into hurdles with the logging API. Writing tests for logging code is... ugly.

I have a Try build at to ensure this doesn't break virtualenv. If it does, I'm not waiting on Python 2.7 (or whatever) on all the build machines, so I'll just remove the virtualenv population for now.

I would be very tempted to check this in without review as NPOTB. However, I personally like reviews. If the build module peers grant NPOTB and punt on review, I'll check in after an f+.
Comment 1 User image Mike Hommey [:glandium] 2012-07-24 22:59:36 PDT
Comment on attachment 645645 [details] [diff] [review]
mozbuild skeleton, v1

Review of attachment 645645 [details] [diff] [review]:

I'm not sure what to say about this, and I surely don't know where you're going with this. I understand the interest of json and text formatters, but you don't explain why you need structured logs.

::: build/virtualenv/packages.txt
@@ +6,5 @@

You'll have a conflict here with bug 776046 that I landed.
Comment 2 User image Jeff Hammel 2012-07-25 11:23:05 PDT
Comment on attachment 645645 [details] [diff] [review]
mozbuild skeleton, v1

+blessings = None
+    import blessings
+    pass

I cringe at bare excepts. How about:

    import blessings:
except ImportError:
    blessings = None

Other than that, this looks good.  I would *love* to see this combined with mozlog:
Comment 3 User image Vladimir Vukicevic [:vlad] [:vladv] 2012-08-03 11:16:42 PDT
Comment on attachment 645645 [details] [diff] [review]
mozbuild skeleton, v1

Looks fine; probably should've kept it together with the front-end bits, since landing this and the warnings parsing by itself is a little odd (doesn't really do much)
Comment 4 User image Gregory Szorc [:gps] (away until 2017-03-20) 2012-08-03 11:47:13 PDT
Comment 5 User image Ed Morley [:emorley] 2012-08-04 11:19:23 PDT

Note You need to log in before you can comment on or make changes to this bug.