On Wed, Aug 17, 2016, at 05:29 AM, Mike Hommey wrote:
> Partly related, there's another one:
> - there are optional parts of moz.configure that are completely unknown
>   when they are not included. This can complicate things in some cases.
>   See for example extra_toolchain_flags. IIRC, there are a few other
>   similar cases, and I can see other such cases appearing as we move
>   more things to python configure.
> 
>   By extension, I've been revisiting the idea from bug 1259272 to have a
>   tool to do some introspection, and that not everything is visible can
>   make it awkward to use such a tool. The worst offender being
>   --enable-project/--enable-application.
> 
>   I came up with a prototype patch that seems to work and would make
>   everything known. The idea is to add a context manager to the sandbox,
>   that works as follows:
>       with only_when(<some_depends_function>):
>           python_configure_stuff()
> 
>   We can then rewrite things like depends_when or include_when using
>   that context manager. For example, include_when (which is the only
>   thing I tested so far) becomes:
>       @template
>       def include_when(filename, when):
>           with only_when(when):
>               include(filename)
> 
>   I expect it would also allow to remove depends_win from
>   windows.configure, for example.

I really like this idea. I know one of the big issues we've had with
moz.build is an inability to introspect the entire state of things
because of conditionals, it would be nice to fix that situation in
moz.configure.

-Ted
_______________________________________________
dev-builds mailing list
dev-builds@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-builds

Reply via email to