@gjsify/node-gi 0.34.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/binding.gyp CHANGED
@@ -41,6 +41,16 @@
41
41
  "OTHER_CFLAGS": [
42
42
  "<!@(pkg-config --cflags girepository-2.0 cairo)"
43
43
  ],
44
+ # scripts/stage-prebuild.mjs rewrites this addon's Homebrew-absolute
45
+ # dependencies to @rpath and gives it a four-entry LC_RPATH list (#1120).
46
+ # A Mach-O's load commands live in a header pad fixed at LINK time, and
47
+ # the default pad is too small for that: install_name_tool then refuses
48
+ # with "larger updated load commands do not fit (the program must be
49
+ # relinked)". Not repairable after the fact, which is why it is a link
50
+ # flag and not a staging step.
51
+ "OTHER_LDFLAGS": [
52
+ "-Wl,-headerpad_max_install_names"
53
+ ],
44
54
  "CLANG_CXX_LANGUAGE_STANDARD": "c++17",
45
55
  "GCC_ENABLE_CPP_EXCEPTIONS": "NO"
46
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/node-gi",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
4
4
  "description": "GObject-Introspection runtime for Node.js — load gi:// namespaces (GLib/GObject/Gio/…) with GJS-compatible semantics. Vendored + rewritten from node-gtk under MIT.",
5
5
  "type": "module",
6
6
  "license": "MIT",
Binary file
Binary file
Binary file
Binary file
Binary file
package/src/class.cc CHANGED
@@ -617,6 +617,21 @@ static void NodeGiClassInit(gpointer g_class, gpointer class_data) {
617
617
  // init_template. Independent of the child binding above — Children /
618
618
  // InternalChildren behaviour is unchanged.
619
619
  NodeGiInstallTemplateScopeOnClass(cd, g_class);
620
+ } else if (widgetType == 0) {
621
+ // GtkWidget is not registered in the type registry THIS addon calls into. The
622
+ // class in hand descends from one (registerClass resolved its parent), so the
623
+ // honest reading is not "your class is wrong" but "there are two GObject copies
624
+ // in this process" — the addon bound one libgobject and GTK registered its types
625
+ // in another. Reported separately because the subclass wording below sent #1120
626
+ // hunting a JS bug for a dyld one: an unrelocated darwin prebuild kept the build
627
+ // host's absolute Homebrew paths and bound Homebrew's libgobject while the
628
+ // batteries-included bundle's libgtk used its own.
629
+ g_warning(
630
+ "node-gi: GtkWidget is not registered in this process's GObject type registry, "
631
+ "so the Template on %s cannot be installed. This means TWO GLib/GObject copies "
632
+ "are loaded — check that the addon and GTK resolve to the same libgobject "
633
+ "(otool -L on the addon; DYLD_PRINT_LIBRARIES=1 to list what loaded)",
634
+ g_type_name(G_TYPE_FROM_CLASS(g_class)));
620
635
  } else if (!isWidget) {
621
636
  g_warning(
622
637
  "node-gi: a Template was set on %s, which is not a Gtk.Widget subclass — "