Does the end user need .gir files?

The following .gir files currently exist on my system. Can it be confirmed that these files are unnecessary for regular end users?

/usr/lib64/mutter-15/Clutter-15.gir
/usr/lib64/mutter-15/Cogl-15.gir
/usr/lib64/mutter-15/CoglPango-15.gir
/usr/lib64/mutter-15/Meta-15.gir
/usr/lib64/mutter-15/MetaTest-15.gir
/usr/lib64/mutter-15/Mtk-15.gir
/usr/share/gir-1.0/ICal-3.0.gir
/usr/share/gir-1.0/ICalGLib-3.0.gir
/usr/share/gnome-shell/Gvc-1.0.gir
/usr/share/gnome-shell/Shell-15.gir
/usr/share/gnome-shell/St-15.gir
/usr/share/gnome-shell/gir-1.0/Shew-0.gir

Thanks in advance.

1 Like

Are you asking because you want to delete system files but you aren’t confident why the files are there?

Just in general:
Never modify system files (those under /usr), unless you really, really know what you’re doing. This especially includes deletion.

As a bit of context: The .gir files are files generated by GObject-Introspection and are used to provide bindings for programming languages to GObject libraries.
As far as I understand it these files could be relevant for runtime-based languages such as Python and JavaScript during runtime, and for other languages during development and compilation.

The important part is: These files are probably there with good reason. And if you want to remove them, do it over the management tool of your system, e.g. your package manager. Unless there is a really, really good reason, /usr shouldn’t be touched manually.

1 Like

GIR files are not relevant for Python and JavaScript applications, as they use the binary introspection data (typelib).

GIR files are typically part of the development package for a GObject-based library, as they are used when generating introspection at compile time; for generating documentation; and for code generation (when using Vala and Rust, for instance).

3 Likes

@jbicha @CodedOre
I’m just wondering if the package maintainer packaged these files by mistake, and if it was a mistake I’d like to help them move these .gir files into the “-devel” package.

What distro are you using?

Fedora Workstation 41 for now.

I’m not up-to-date on how Fedora GNOME packaging works, but for comparison, Debian & Ubuntu install the equivalent of %{_libdir}/mutter-%{mutter_api_version}/*.gir to the mutter devel package. So yes, it looks like you’re right. You can open a Fedora bug for your suggestion.