[webkit-dev] Common build system (was Re: WebKit Wishes)

Dirk Pranke dpranke at chromium.org
Tue Feb 5 17:33:56 PST 2013


I have looked at YAML off and on over the years, and I'm not sure that
it would be much of an improvement in this case.

I do believe that dropping the strict python syntax could make some
things easier to read. I don't have a fully-baked proposal in mind,
and I don't know what the perf hit would be.

I will also note that -- like in many languages -- it's easy to write
hard-to-read files. GYP has never had much of a style guide, and it
probably could greatly benefit from one.

It is important to make a fair apples-to-apples comparison for
whatever we end up looking at. I suspect that given any tool or
language, you can find some things that are easy to express and some
that are harder. Even the existing chromium gyp files are not
necessarily a model of clean code or good style.

Also, one thing that's important to realize about GYP's syntax is that
it is very set-based; the order things appear in the files is much
less important than in many other languages (especially in how they
handle conditionals, i.e., if/then/else). This has many advantages,
but does also have some disadvantages.

-- Dirk

On Tue, Feb 5, 2013 at 12:16 PM, Eric Seidel <eric at webkit.org> wrote:
> I'm curious if YAML was ever considered?  I have very limited
> experience with YAML, except for Google App Engine config files.
>
> It's very python parse-able? :)
>
> On Tue, Feb 5, 2013 at 11:55 AM, Mark Mentovai <mark at chromium.org> wrote:
>> You’re not supposed to use arbitrary Python, it’s highly discouraged. We
>> have a linter that keeps you from doing things you’re not supposed to do
>> (like this), but it slows things down, so it’s not part of the “standard”
>> GYP run that developers normally use. It can run as a pre-commit script or
>> test on the bot or something else. Used as we’re using it, GYP basically is
>> simple JSON, except the rules about commas are looser and # introduces
>> comments.
>>
>>
>> On Tue, Feb 5, 2013 at 2:47 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
>>>
>>> On Tue, Feb 5, 2013 at 6:09 AM, Mark Mentovai <mark at chromium.org> wrote:
>>>>
>>>> The parser (and the grammar) works the way it does because it’s just
>>>> Python
>>>
>>>
>>> This works great for people who like Python syntax but not for someone
>>> like myself who dislikes Python syntax.
>>>
>>> I also find it particularly annoying that people can use whatever Python
>>> constructs they want to use in GYP. It dramatically reduces language
>>> portability because you need to support quite a few Python constructs and
>>> quirks in order to correctly parse GYP.
>>>
>>> I personally would have much preferred for it be a simple JSON file.
>>>
>>> - R. Niwa
>>>
>>
>>
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> https://lists.webkit.org/mailman/listinfo/webkit-dev
>>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev


More information about the webkit-dev mailing list