[Webkit-unassigned] [Bug 101224] [GTK] Check DOM bindings API compatibility while building

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 5 09:27:48 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=101224





--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-11-05 09:29:17 PST ---
(In reply to comment #2)
> (From update of attachment 172342 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=172342&action=review
> 
> > Source/WebCore/bindings/gobject/GNUmakefile.am:484
> > +	&& (cmp -s $@ $(WebCore)/bindings/gobject/webkitdom.symbols || $(PYTHON) $(WebCore)/bindings/scripts/gobject-check-api $@ $(WebCore)/bindings/gobject/webkitdom.symbols) \
> 
> I'm curious why you don't just use the diff tool here.

I'm assuming it's faster to use cmp when the files are the same than running the python script.

> > Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:1484
> > +    # Write a symbols file.
> > +    my $symbolsFileName = "$outputDir/" . $basename . ".symbols";
> > +    open(SYM, ">$symbolsFileName") or die "Couldn't open file $symbolsFileName";
> > +    print SYM @symbols;
> > +    close(SYM);
> 
> Instead of four symbols files, I wonder if there could only be one.

There aren't four, there's one symbols file per DOM object. This is because the generator script is called per DOM object. We could use a single file, and append the symbols, but then we would need rules in the makefile to delete the file before generating the bindings, and append the symbols for the static sources, so it would be more complicated. 

Also, I plan to use this to create a -sections.txt file for gtk-doc. Having a .symbols file per object makes it easier, because we know that every .symbols files is a section, and its contents the methods.

> > Source/WebCore/bindings/scripts/gobject-check-api:1
> > +#!/usr/bin/env python
> 
> Just a naming nit: This should probably be called detect-gobject-api-breaks or something like that, especially with the verb first.

I followed the same approach than the other bindings scripts like gobject-generate-headers.pl

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list