-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate gobject bindings as part of our build process #6700
Comments
The problem is that then the bindings we generate would depend on the versions of the libraries installed on the user's computer, which means that we need to do comptime version checks again to selectively exclude code — we were able to avoid this for a while since if we used symbols in the bindings that were absent from the system libraries, it's a link-time error; if we generate bindings individually then it's a compile-time error which is much more annoying to avoid |
Is this an argument to bundle our own GIR files then? I'm completely okay with that and throwing them up on |
I think that's totally fair |
That's effectively what we're doing now already so I do argue that vendoring (via a deps URL) all the GIR files to start is probably the right initial approach. It doesn't change what's already been happening. If there is a benefit or request (packagers) to support system GIR files then we can entertain that later. |
A couple of notes:
|
Okay, I understand what's happening with ghostty-gobject. I see how we could do it all in our build process. To simplify the scope of this, I think we should store the GIR files in a deps archive we download at least for now. This is basically the same thing we're doing now (since we're downloading the bindings as an archive). It doesn't change the threat model, dependency requirements, etc etc. I see how you get the GIR paths @jcollie and this is one area I think Nix can make things really easy for us. If you want to extract a From there, I think we should generate the rest in our build process. I think that'll be fairly straightforward. |
I hit submit too early. I think the previous comment is good enough for the scope of this issue. If we want to expand to using system-provided GIR files then I think that's a separate scope and also at least for me needs a bit more justification due to the build complexity. For now, packagers have been happy with our approach so I think the tarball of GIR files is easy enough to get going with. |
Oh okay, I got pretty far, and it is very annoying that This isn't the highest priority thing, anyways. |
We currently depend on https://github.com/jcollie/ghostty-gobject but there's no reason to have a dependency at all; we can generate all of this as part of our normal build process.
We should probably use the GIR files provided by the system if they're available but I don't want to force more complexity for packagers so if we can fallback to GIR files we provide that'd be good.
This may also fall under the umbrella of preprocessing that shouldn't be happening at all during a packaging process so we may want to consider generating and vendoring this as part of our source tarball build (similar to how C libs e.g. gettext convert their parsers from y to C before source tarball build).
The text was updated successfully, but these errors were encountered: