Introspection: compare girs or typelibs

Hi,

Is there any tool to compare two *.gir or *.typelib files to detect API changes?

I mean, the real API stuff, like:

  • number of parameters
  • their name, type, direction
  • return type

and ignoring (optionally) the doc blurbs or insignificant data.
Something that developers can use to spot regressions.

Not that I know of.

It shouldn’t be hard to write a diff tool that parses two GIR files, traverses them all, and finds the differences. You could reuse the parser provided by gobject-introspection, or one of the existing parsers in other projects—gi-docgen, gtk-rs, or vala. You could even implement a parser yourself: it’s not exceedingly complicated, and the GIR schema is kept up to date.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.