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


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

Description Gregory Szorc [:gps] 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 https://tbpl.mozilla.org/?tree=Try&rev=89a13caf6a8e 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 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 @@
>  setup.py:testing/mozbase/mozprocess:develop
>  setup.py:testing/mozbase/mozprofile:develop
>  setup.py:testing/mozbase/mozrunner:develop
>  setup.py:build/pylib/blessings:develop
> +setup.py:python/mozbuild:develop

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

+blessings = None
+
+try:
+    import blessings
+except:
+    pass

I cringe at bare excepts. How about:

try:
    import blessings:
except ImportError:
    blessings = None

Other than that, this looks good.  I would *love* to see this combined with mozlog: https://github.com/mozilla/mozbase/tree/master/mozlog
Comment 3 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 5 Ed Morley [:emorley] 2012-08-04 11:19:23 PDT
https://hg.mozilla.org/mozilla-central/rev/da67b46ba82c

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