Skip to content

Commit

Permalink
gjs: Import newer version from pkgsrc-wip.
Browse files Browse the repository at this point in the history
Version 1.64.1
--------------

- The BigInt type is now _actually_ available, as it wasn't enabled in the
  1.64.0 release even though it was mentioned in the release notes.

- Closed bugs and merge requests:
  * testCommandLine's Unicode tests failing on Alpine Linux [Philip Chimento,
    #296, !399]
  * build: Various clean-ups [Jan Tojnar, !403]
  * Correctly handle vfunc inout parameters [Marco Trevisan, !404]
  * Fix failed redirect of output in CommandLine tests [Liban Parker, !409]

Version 1.58.6
--------------

- Various backports:
  * Correctly handle vfunc inout parameters [Marco Trevisan]
  * Fix failed redirect of output in CommandLine tests [Liban Parker]
  * Avoid filename conflict when tests run in parallel [Philip Chimento]

Version 1.64.0
--------------

- No change from 1.63.92.

Version 1.63.92
---------------

- Closed bugs and merge requests:
  * object: Use g_irepository_get_object_gtype_interfaces [Colin Walters, Philip
    Chimento, #55, !52]
  * Add -fno-semantic-interposition to -Bsymbolic-functions [Jan Alexander
    Steffens (heftig), #303, !397]
  * examples: add a dbus-client and dbus-service example [Andy Holmes, !398]
  * Various GNOME Shell crashes during GC, mozjs68 regression [Jan Alexander
    Steffens (heftig), Philip Chimento, #301, !396]

Version 1.63.91
---------------

- Closed bugs and merge requests:
  * [mozjs68] Reorganize modules for ESM. [Evan Welsh, Philip Chimento, !383]
  * Various maintenance [Philip Chimento, !388]
  * Fix building GJS master with Visual Studio and update build instructions
    [Chun-wei Fan, !389]
  * Resolve "Gnome Shell crash on GC run with mozjs68" [Philip Chimento, !391]
  * installed-tests/js: Add missing dep on warnlib_typelib [Jan Alexander
    Steffens, !393]
  * object: Cache known unresolvable properties [Daniel van Vugt, Philip
    Chimento, !394, #302]

Version 1.58.5
--------------

- Closed bugs and merge requests:
  * Fix Visual Studio builds of gnome-3-34 (1.58.x) branch [Chun-wei Fan, !392]
  * Can not access GObject properties of classes without GI information [Juan
    Pablo Ugarte, !385, #299]

Version 1.63.90
---------------

- New JS API: The GObject module has gained new overrides:
  GObject.signal_handler_find(), GObject.signal_handlers_block_matched(),
  GObject.signal_handlers_unblock_matched(), and
  GObject.signal_handlers_disconnect_matched(). These overrides replace the
  corresponding C API, which was not idiomatic for JavaScript and was not fully
  functional because it used bare C pointers for some of its functionality.
  See modules/overrides/GObject.js for API documentation.

- New JavaScript features! This version of GJS is based on SpiderMonkey 68, an
  upgrade from the previous ESR (Extended Support Release) of SpiderMonkey 60.
  Here are the highlights of the new JavaScript features.
  For more information, look them up on MDN or devdocs.io.

  * New language features
    + The BigInt type, currently a stage 3 proposal in the ES standard, is now
      available.

  * New syntax
    + `globalThis` is now the ES-standard supported way to get the global
      object, no matter what kind of JS environment. The old way, `window`, will
      still work, but is no longer preferred.
    + BigInt literals are expressed by a number with "n" appended to it: for
      example, `1n`, `9007199254740992n`.

  * New APIs
    + String.prototype.trimStart() and String.prototype.trimEnd() now exist and
      are preferred instead of trimLeft() and trimRight() which are nonstandard.
    + String.prototype.matchAll() allows easier access to regex capture groups.
    + Array.prototype.flat() flattens nested arrays, well-known from lodash and
      similar libraries.
    + Array.prototype.flatMap() acts like a reverse filter(), allowing adding
      elements to an array while iterating functional-style.
    + Object.fromEntries() creates an object from iterable key-value pairs.
    + Intl.RelativeTimeFormat is useful for formatting time differences into
      human-readable strings such as "1 day ago".
    + BigInt64Array and BigUint64Array are two new typed array types.

  * New behaviour
    + There are a lot of minor behaviour changes as SpiderMonkey's JS
      implementation conforms ever closer to existing ECMAScript standards and
      adopts new ones. For complete information, read the Firefox developer
      release notes:
      https://developer.mozilla.org/en-US/Firefox/Releases/61#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/62#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/63#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/64#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/65#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/66#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/67#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/68#JavaScript

  * Backwards-incompatible changes
    + The nonstandard String generics were removed. These had only ever been
      implemented by Mozilla and never made it into a standard. (An example of a
      String generic is calling a string method on something that might not be a
      string like this: `String.endsWith(foo, 5)`. The proper way is
      `String.prototype.endsWith.call(foo, 5)` or converting `foo` to a string.)
      This should not pose much of a problem for existing code, since in the
      previous version these would already print a deprecation warning whenever
      they were used.
      You can use `moz68tool` from mozjs-deprecation-tools
      (https://gitlab.gnome.org/ptomato/moz60tool) to scan your code for this
      nonstandard usage.

- Closed bugs and merge requests:
  * invalid import on signal.h [#295, !382, Philip Chimento]
  * SpiderMonkey 68 [#270, !386, Philip Chimento]
  * GObject: Add override for GObject.handler_block_by_func [#290, !371, Philip
    Chimento]

Version 1.63.3
--------------

- Closed bugs and merge requests:
  * JS ERROR: TypeError: this._rooms.get(...) is undefined [Philip Chimento,
    #289, !367]
  * Run CI build with --werror [Philip Chimento, #286, !365]
  * build: Remove Autotools build system [Philip Chimento, !364]
  * gjs-symlink script is incompatible with distro builds [Michael Catanzaro,
    Bastien Nocera, #291, !369, !370]
  * installed-tests: Don't hardcode the path of bash [Ting-Wei Lan, !372]
  * Update Visual Studio build instructions (after migrating to full Meson-based
    builds) [Chun-wei Fan, !375]
  * object: Warn when setting a deprecated property [Florian Müllner, !378]
  * CI: Create mozjs68 CI images [Philip Chimento, !379]
  * Various maintenance [Philip Chimento, !374, !380, !381]

Version 1.58.4
--------------

- Now prints a warning when constructing an unregistered object inheriting from
  GObject (i.e. if you forgot to use GObject.registerClass.) In 1.58.2 this
  would throw an exception, which broke some existing code, so that change was
  reverted in 1.58.3. In this version the check is reinstated, but we log a
  warning instead of throwing an exception, so that people know to fix their
  code, but without breaking things.
  NOTE: In 1.64 (the next stable release) the warning will be changed back into
  an exception, because code with this problem can be subtly broken and cause
  unexpected errors elsewhere. So make sure to fix your code if you get this
  warning.

- Closed bugs and merge requests:
  * GSettings crash fixes [Andy Holmes, !373]

- Memory savings for Cairo objects [Philip Chimento, !374]

- Fix for crash in debug functions [Philip Chimento, !374]

Version 1.63.2
--------------

- There is an option for changing the generated GType name for GObject classes
  created in GJS to a new scheme that is less likely to have collisions. This
  scheme is not yet the default, but you can opt into it by setting
  `GObject.gtypeNameBasedOnJSPath = true;` as early as possible in your
  prograṁ. Doing this may require some changes in Glade files if you use
  composite widget templates.

  We recommend you make this change in your codebase as soon as possible, to
  avoid any surprises in the future.

- New JS API: GObject.Object has gained a stop_emission_by_name() method which
  is a bit more idiomatic than calling GObject.signal_stop_emission_by_name().

- It's now supported to use the "object" attribute in a signal connection in a
  composite widget template in a Glade file.

- Closed bugs and merge requests:
  * CI: Tweak eslint rule for unneeded parentheses [Florian Müllner, !353]
  * Smarter GType name computation [Marco Trevisan, !337]
  * Meson CI [Philip Chimento, !354]
  * Visual Studio builds using Meson [Chun-wei Fan, !355]
  * Hide internal symbols from ABI [Marco Trevisan, #194, !352]
  * Allow creating custom tree models [Giovanni Campagna, #71]
  * build: Fix dist files [Florian Müllner, !357]
  * GObject: Add convenience wrapper for signal_stop_emission_by_name() [Florian
    Müllner, !358]
  * Various maintenance [Philip Chimento, !356]
  * object_instance_props_to_g_parameters should do more check on argv [Philip
    Chimento, #63, !359]
  * Support flat C arrays of structures [Philip Chimento, !361]
  * Gtk Templates: support connectObj argument [Andy Holmes, !363]

- Various build fixes [Philip Chimento]

Version 1.58.2
--------------

- Closed bugs and merge requests:
  * GObject based class initialization checks [Marco Trevisan, Philip Chimento,
    !336]
  * Silently leaked return value of callbacks [Xavier Claessens, Philip
    Chimento, #86, !44]
  * Crash when calling Gio.Initable.async_init with not vfunc_async_init
    implementation [Philip Chimento, #287, !362]
  * [cairo] insufficient checking [Philip Chimento, #49, !360]

- Various crash fixes backported from the development branch that didn't close
  a bug or merge request.

Version 1.63.1
--------------

- Note that the 1.59, 1.60, 1.61, and 1.62 releases are hereby skipped, because
  we are calling the next stable series 1.64 to match gobject-introspection and
  GLib.

- GJS now includes a Meson build system. This is now the preferred way to build
  it; however, the old Autotools build system is still available for a
  transitional period.

- Closed bugs and merge requests:
  * GObject: Add convenience wrapper for signal_handler_(un)block() [Florian
    Müllner, !326]
  * GObject based class initialization checks [Marco Trevisan, Philip Chimento,
    !336]
  * Meson port [Philip Chimento, !338]
  * add http client example [Sonny Piers, !342]
  * Smaller CI, phase 2 [Philip Chimento, !343]
  * add websocket client example [Sonny Piers, !344]
  * Fix Docker images build [Philip Chimento, !345]
  * CI: Use new Docker images [Philip Chimento, !346]
  * docs: Update internal links [Andy Holmes, !348]
  * Don't pass generic marshaller to g_signal_newv() [Niels De Graef, !349]
  * tests: Fail debugger tests if command failed [Philip Chimento, !350]
  * Minor CI image fixes [Philip Chimento, !351]
  * Various fixes [Marco Trevisan, Philip Chimento]

Version 1.58.1
--------------

- Closed bugs and merge requests:
  * Import wiki documentation [Sonny Piers, !341]
  * Smaller CI, phase 1 [Philip Chimento, !339]
  * Crashes after setting child property 'icon-name' on GtkStack then displaying
    another GtkStack [Florian Müllner, #284, !347]
  * GLib.strdelimit crashes [Philip Chimento, #283, !340]

Version 1.58.0
--------------

- No change from 1.57.92.

Version 1.57.92
---------------

- Closed bugs and merge requests:
  * tests: Enable regression test cases for GPtrArrays and GArrays of structures
    [Stéphane Seng, !334]
  * Various maintenance [Philip Chimento, !333, !335]

Version 1.57.91
---------------

- GJS no longer links to libgtk-3. This makes it possible to load the Gtk-4.0
  typelib in GJS and write programs that use GTK 4.

- The heapgraph tool has gained some improvements; it is now possible to print a
  heap graph of multiple targets. You can also mark an object for better
  identification in the heap graph by assigning a magic property: for example,
  myObject.__heapgraph_name = 'Button' will make that object identify itself as
  "Button" in heap graphs.

- Closed bugs and merge requests:
  * Remove usage of Lang in non legacy code [Sonny Piers, !322]
  * GTK4 [Florian Müllner, #99, !328, !330]
  * JS syntax fixes [Marco Trevisan, Philip Chimento, !306, !323]
  * gi: Avoid infinite recursion when converting GValues [Florian Müllner, !329]
  * Implement all GObject-introspection test suites [Philip Chimento, !327,
    !332]
  * Heapgraph improvements [Philip Chimento, !325]

Version 1.57.90
---------------

- New JS API: GLib.Variant has gained a recursiveUnpack() method which
  transforms the variant entirely into a JS object, discarding all type
  information. This can be useful for dealing with a{sv} dictionaries, where
  deepUnpack() will keep the values as GLib.Variant instances in order to
  preserve the type information.

- New JS API: GLib.Variant has gained a deepUnpack() method which is exactly the
  same as the already existing deep_unpack(), but fits with the other camelCase
  APIs that GJS adds.

- Closed bugs and merge requests:
  * Marshalling of GPtrArray broken [#9, !311, Stéphane Seng]
  * Fix locale chooser [!313, Philip Chimento]
  * dbus-wrapper: Remove interface skeleton flush idle on dispose [!312, Marco
    Trevisan]
  * gobject: Use auto-compartment when getting property as well [!316, Florian
    Müllner]
  * modules/signals: Use array destructuring in _emit [!317, Jonas Dreßler]
  * GJS can't call glibtop_init function from libgtop [#259, !319,
    Philip Chimento]
  * GLib's VariantDict is missing lookup [#263, !320, Sonny Piers]
  * toString on an object implementing an interface fails [#252, !299, Marco
    Trevisan]
  * Regression in GstPbutils.Discoverer::discovered callback [#262, !318, Philip
    Chimento]
  * GLib.Variant.deep_unpack not working properly with a{sv} variants [#225,
    !321, Fabián Orccón, Philip Chimento]
  * Various maintenance [!315, Philip Chimento]

- Various CI fixes [Philip Chimento]

Version 1.57.4
--------------

- Closed bugs and merge requests:
  * gjs 1.57 requires a recent sysprof version for sysprof-capture-3 [#258,
    !309, Olivier Fourdan]

- Misc documentation changes [Philip Chimento]

Version 1.57.3
--------------

- The GJS profiler is now integrated directly into Sysprof 3, via the
  GJS_TRACE_FD environment variable. Call stack information and garbage
  collector timing will show up in Sysprof. See also GNOME/Initiatives#10

- New JS API: System.addressOfGObject(obj) will return a string with the hex
  address of the underlying GObject of `obj` if it is a GObject wrapper, or
  throw an exception if it is not. This is intended for debugging.

- New JS API: It's now possible to pass a value from Gio.DBusProxyFlags to the
  constructor of a class created by Gio.DBusProxy.makeProxyWrapper().

- Backwards-incompatible change: Trying to read a write-only property on a DBus
  proxy object, or write a read-only property, will now throw an exception.
  Previously it would fail silently. It seems unlikely any code is relying on
  the old behaviour, and if so then it was probably masking a bug.

- Closed bugs and merge requests:
  * Build failure on Continuous [#253, !300, Philip Chimento]
  * build: Bump glib requirement [!302, Florian Müllner]
  * profiler: avoid clearing 512 bytes of stack [!304, Christian Hergert]
  * system: add addressOfGObject method [!296, Marco Trevisan]
  * Add support for GJS_TRACE_FD [!295, Christian Hergert]
  * Gio: Make possible to pass DBusProxyFlags to proxy wrapper [!297, Marco
    Trevisan]
  * Various maintenance [!301, Philip Chimento]
  * Marshalling of GPtrArray broken [#9, !307, Stéphane Seng]
  * Build fix [!308, Philip Chimento]
  * Gio: sync dbus wrapper properties flags [!298, Marco Trevisan]
  * GjsMaybeOwned: Reduce allocation when used as Object member [!303, Marco
    Trevisan]

Version 1.57.2
--------------

- There are now overrides for Gio.SettingsSchema and Gio.Settings which avoid
  aborting the whole process when trying to access a nonexistent key or child
  schema. The original API from GLib was intended for apps, since apps should
  have complete control over which settings keys they are allowed to access.
  However, it is not a good fit for shell extensions, which may need to access
  different settings keys depending on the version of GNOME shell they're
  running on.

  This feature is based on code from Cinnamon which the copyright holders have
  kindly agreed to relicense to GJS's license.

- New JS API: It is now possible to pass GObject.TypeFlags to
  GObject.registerClass(). For example, passing
  `GTypeFlags: GObject.TypeFlags.ABSTRACT` in the class info object, will create
  a class that cannot be instantiated. This functionality was present in
  Lang.Class but has been missing from GObject.registerClass().

- Closed bugs and merge requests:
  * Document logging features [#230, !288, Andy Holmes]
  * Support optional GTypeFlags value in GObject subclasses [!290, Florian
    Müllner]
  * Ensure const-correctness in C++ objects [#105, !291, Onur Şahin]
  * Programmer errors with GSettings cause segfaults [#205, !284, Philip
    Chimento]
  * Various maintenance [!292, Philip Chimento]
  * debugger: Fix summary help [!293, Florian Müllner]
  * context: Use Heap pointers for GC objects stored in vectors [!294, Philip
    Chimento]

Version 1.56.2
--------------

- Closed bugs and merge requests:
  * Crash in BoxedInstance when struct could not be allocated directly [#240,
    !285, Philip Chimento]
  * Cairo conversion bugs [!286, Philip Chimento]
  * Gjs crashes when binding inherited property to js added gobject-property
    [#246, !289, Marco Trevisan]
  * console: Don't accept --profile after the script name [!287, Philip
    Chimento]

Version 1.57.1
--------------

- Closed bugs and merge requests:
  * Various maintenance [!279, Philip Chimento]
  * mainloop: Assign null to property instead of deleting [!280, Jason Hicks]
  * Added -d version note README.md [!282, Nauman Umer]
  * Extra help for debugger commands [#236, !283, Nauman Umer]
  * Crash in BoxedInstance when struct could not be allocated directly [#240,
    !285, Philip Chimento]
  * Cairo conversion bugs [!286, Philip Chimento]

Version 1.56.1
--------------

- Closed bugs and merge requests:
  * Calling dumpHeap() on non-existent directory causes crash [#134, !277,
    Philip Chimento]
  * Using Gio.MemoryInputStream.new_from_data ("string") causes segfault [#221,
    !278, Philip Chimento]
  * Fix gjs_context_eval() for non-zero-terminated strings [!281, Philip
    Chimento]

Version 1.56.0
--------------

- No change from 1.55.92.

Version 1.55.92
---------------

- Closed bugs and merge requests:
  * Fix CI failures [!269, Philip Chimento]
  * Possible memory allocation/deallocation bug (possibly in js_free() in GJS)
    [!270, Chun-wei Fan, Philip Chimento]
  * cairo-context: Special-case 0-sized vector [!271, Florian Müllner]
  * Add some more eslint rules [!272, Florian Müllner]
  * win32/NMake: Fix introspection builds [!274, Chun-wei Fan]
  * NMake/libgjs-private: Export all the public symbols there [!275, Chun-wei
    Fan]

Version 1.55.91
---------------

- The problem of freezing while running the tests using GCC's sanitizers was
  determined to be a bug in GCC, which was fixed in GCC 9.0.1.

- Closed bugs and merge requests:
  * gnome-sound-recorder crashes deep inside libgjs [#223, !266, Philip
    Chimento]
  * Various maintenance [!267, Philip Chimento]
  * wrapperutils: Define $gtype property as non-enumerable [!268, Philip
    Chimento]

Version 1.55.90
---------------

- New JS API: It's now possible to call and implement DBus methods whose
  parameters or return types include file descriptor lists (type signature 'h'.)
  This involves passing or receiving a Gio.UnixFDList instance along with the
  parameters or return values.

  To call a method with a file descriptor list, pass the Gio.UnixFDList along
  with the rest of the parameters, in any order, the same way you would pass a
  Gio.Cancellable or async callback.

  For return values, things are a little more complicated, in order to avoid
  breaking existing code. Previously, synchronously called DBus proxy methods
  would return an unpacked GVariant. Now, but only if called with a
  Gio.UnixFDList, they will return [unpacked GVariant, Gio.UnixFDList]. This
  does not break existing code because it was not possible to call a method with
  a Gio.UnixFDList before, and the return value is unchanged if not calling with
  a Gio.UnixFDList. This does mean, unfortunately, that if you have a method
  with an 'h' in its return signature but not in its argument signatures, you
  will have to call it with an empty FDList in order to receive an FDList with
  the return value, when calling synchronously.

  On the DBus service side, when receiving a method call, we now pass the
  Gio.UnixFDList received from DBus to the called method. Previously, sync
  methods were passed the parameters, and async methods were passed the
  parameters plus the Gio.DBusInvocation object. Appending the Gio.UnixFDList to
  those parameters also should not break existing code.

  See the new tests in installed-tests/js/testGDBus.js for examples of calling
  methods with FD lists.

- We have observed on the CI server that GJS 1.55.90 will hang forever while
  running the test suite compiled with GCC 9.0.0 and configured with the
  --enable-asan and --enable-ubsan arguments. This should be addressed in one of
  the following 1.55.x releases.

- Closed bugs and merge requests:
  * GDBus proxy overrides should support Gio.DBusProxy.call_with_unix_fd_list()
    [#204, !263, Philip Chimento]
  * Add regression tests for GObject vfuncs [!259, Jason Hicks]
  * GjsPrivate: Sources should be C files [!262, Philip Chimento]
  * build: Vendor last-good version of AX_CODE_COVERAGE [!264, Philip Chimento]

Version 1.55.4
--------------

- Closed bugs and merge requests:
  * Various maintenance [!258, Philip Chimento]
  * Boxed copy constructor should not be called, split Boxed into prototype and
    instance structs [#215, !260, Philip Chimento]

Version 1.55.3
--------------

- Closed bugs and merge requests:
  * Manually constructed ByteArray toString segfaults [#219, !254, Philip
    Chimento]
  * signals: Add _signalHandlerIsConnected method [!255, Jason Hicks]
  * Various maintenance [!257, Philip Chimento]

Version 1.52.5
--------------

- This was a release consisting only of backports from the GNOME 3.30 branch to
  the GNOME 3.28 branch.

- This release includes the "Big Hammer" patch from GNOME 3.30 to reduce memory
  usage. For more information, read the blog post at
  https://feaneron.com/2018/04/20/the-infamous-gnome-shell-memory-leak/
  It was not originally intended to be backported to GNOME 3.28, but in practice
  several Linux distributions already backported it, and it has been working
  well to reduce memory usage, and the bugs have been ironed out of it.

  It does decrease performance somewhat, so if you don't want that then don't
  install this update.

- Closed bugs and merge requests:

  * Ensure not to miss the force_gc flag [#150, !132, Carlos Garnacho]
  * Make GC much more aggressive [#62, !50, Giovanni Campagna, Georges Basile
    Stavracas Neto, Philip Chimento]
  * Queue GC when a GObject reference is toggled down [#140, !114, !127, Georges
    Basile Stavracas Neto]
  * Reduce memory overhead of g_object_weak_ref() [#144, !122, Carlos Garnacho,
    Philip Chimento]
  * context: Defer and therefore batch forced GC runs [performance] [!236,
    Daniel van Vugt]
  * context: use timeout with seconds to schedule a gc trigger [!239, Marco
    Trevisan]
  * Use compacting GC on RSS size growth [!133, #151, Carlos Garnacho]
  * GType memleak fixes [!244, Marco Trevisan]

Version 1.55.2
--------------

- Closed bugs and merge requests:
  * Gnome-shell crashes on destroying cached param specs [#213, !240, Marco
    Trevisan]
  * Various maintenance [!235, !250, Philip Chimento]
  * Auto pointers builder [!243, Marco Trevisan]
  * configure.ac: Update bug link [!245, Andrea Azzarone]
  * SIGSEGV when exiting gnome-shell [#212, !247, Andrea Azzarone, Philip
    Chimento]
  * Fix build with --enable-dtrace and create CI job to ensure it doesn't break
    in the future [#196, !237, !253, Philip Chimento]
  * Delay JSString-to-UTF8 conversion [!249, Philip Chimento]
  * Annotate return values [!251, Philip Chimento]
  * Fix a regression with GError toString() [!252, Philip Chimento]
  * GType memleak fixes [!244, Marco Trevisan]
  * Atoms refactor [!233, Philip Chimento, Marco Trevisan]
  * Write a "Code Hospitable" README file [#17, !248, Philip Chimento, Andy
    Holmes, Avi Zajac]
  * object: Method lookup repeatedly traverses introspection [#54, !53, Colin
    Walters, Philip Chimento]
  * Handler of GtkEditable::insert-text signal is not run [#147, !143, Tomasz
    Miąsko, Philip Chimento]

Version 1.54.3
--------------

- Closed bugs and merge requests:
  * object: Fix write-only properties [!246, Philip Chimento]
  * SIGSEGV when exiting gnome-shell [#212, !247, Andrea Azzarone]
  * SelectionData.get_targets crashes with "Unable to resize vector" [#201,
    !241, Philip Chimento]
  * Gnome-shell crashes on destroying cached param specs [#213, !240, Marco
    Trevisan]
  * GType memleak fixes [!244, Marco Trevisan]
  * Fix build with --enable-dtrace and create CI job to ensure it doesn't break
    in the future [#196, !253, Philip Chimento]

Version 1.54.2
--------------

- Closed bugs and merge requests:
  * context: Defer and therefore batch forced GC runs [performance] [!236,
    Daniel van Vugt]
  * context: use timeout with seconds to schedule a gc trigger [!239, Marco
    Trevisan]
  * fundamental: Check if gtype is valid before using it [!242, Georges Basile
    Stavracas Neto]

- Backported a fix for a crash in the interactive interpreter when executing
  something like `throw "foo"` [Philip Chimento]

- Backported various maintenance from 3.31 [Philip Chimento]

Version 1.55.1
--------------

- New API for programs that embed GJS: gjs_memory_report(). This was already an
  internal API, but now it is exported.

- Closed bugs and merge requests:

  * object: Implement newEnumerate hook for GObject [!155, Ole Jørgen Brønner]
  * Various maintenance [!228, Philip Chimento]
  * ByteArray.toString should stop at null bytes [#195, !232, Philip Chimento]
  * Byte arrays that represent encoded strings should be 0-terminated [#203,
    !232, Philip Chimento]
  * context: Defer and therefore batch forced GC runs [performance] [!236,
    Daniel van Vugt]
  * context: use timeout with seconds to schedule a gc trigger [!239, Marco
    Trevisan]
  * arg: Add special-case for byte arrays going to C [#67, !49, Jasper
    St. Pierre, Philip Chimento]

Version 1.52.4
--------------

- This was a release consisting only of backports from the GNOME 3.30 branch to
  the GNOME 3.28 branch.

- Closed bugs and merge requests:

  * `ARGV` encoding issues [#22, !108, Evan Welsh]
  * Segfault on enumeration of GjSFileImporter properties when a searchpath
    entry contains a symlink [#154, !144, Ole Jørgen Brønner]
  * Possible refcounting bug around GtkListbox signal handlers [#24, !154,
    Philip Chimento]
  * Fix up GJS_DISABLE_JIT flag now the JIT is enabled by default in
    SpiderMonkey [!159, Christopher Wheeldon]
  * Expose GObject static property symbols. [!197, Evan Welsh]
  * Do not run linters on tagged commits [!181, Claudio André]
  * gjs-1.52.0 fails to compile against x86_64 musl systems [#132, !214, Philip
    Chimento]
  * gjs no longer builds after recent autoconf-archive updates [#149, !217,
    Philip Chimento]

Version 1.54.1
--------------

- Closed bugs and merge requests:
  * legacy: Ensure generated GType names are valid [!229, Florian Müllner]
  * Fix GJS profiler with MozJS 60 [!230, Georges Basile Stavracas Neto]
  * Regression with DBus proxies [#202, !231, Philip Chimento]

Version 1.54.0
--------------

- Compatibility fix for byte arrays: the legacy toString() behaviour of byte
  arrays returned from GObject-introspected functions is now restored. If you
  use the functionality, a warning will be logged asking you to upgrade your
  code.

- Closed bugs and merge requests:
  * byteArray: Add compatibility toString property [Philip Chimento, !227]

Version 1.53.92
---------------

- Technology preview of a GNOME 3.32 feature: native Promises for GIO-style
  asynchronous operations. This is the result of Avi Zajac's summer internship.
  To use it, you can opt in once for each specific asynchronous method, by
  including code such as the following:

      Gio._promisify(Gio.InputStream.prototype, 'read_bytes_async',
          'read_bytes_finish');

  After executing this, you will be able to use native Promises with the
  Gio.InputStream.prototype.read_async() method, simply by not passing a
  callback to it:

      try {
          let bytes = await stream.read_bytes_async(count, priority, cancel);
      } catch (e) {
          logError(e, 'Failed to read bytes');
      }

  Note that any "success" boolean return values are deleted from the array of
  return values from the async method. That is,

      let [contents, etag] = file.load_contents_async(cancel);

  whereas the callback version still returns a useless [ok, contents, etag]
  that can never be false, since on false an exception would be thrown. In the
  callback version, we must keep this for compatibility reasons.

  Note that due to a bug in GJS (https://gitlab.gnome.org/GNOME/gjs/issues/189),
  promisifying methods on Gio.File.prototype and other interface prototypes will
  not work. We provide the API Gio._LocalFilePrototype on which you can
  promisify methods that will work on Gio.File instances on the local disk only:

      Gio._promisify(Gio._LocalFilePrototype, 'load_contents_async',
          'load_contents_finish');

  We estimate this will cover many common use cases.

  Since this is a technology preview, we do not guarantee API stability with
  the version coming in GNOME 3.32. These APIs are marked with underscores to
  emphasize that they are not stable yet. Use them at your own risk.

- Closed bugs and merge requests:
  * Added promisify to GJS GIO overrides [!225, Avi Zajac]
  * Temporary fix for Gio.File.prototype [!226, Avi Zajac]

Version 1.53.91
---------------

- Closed bugs and merge requests:
  * CI: add webkit and gtk-app tests [!222, Claudio André]
  * Fix example eslint errors [!207, Claudio André, Philip Chimento]
  * Fix more "lost" GInterface properties [!223, Florian Müllner]
  * Fix --enable-installed-tests when built from a tarball [!224, Simon
    McVittie]

Version 1.53.90
---------------

- GJS now depends on SpiderMonkey 60 and requires a compiler capable of C++14.

- GJS includes a simple debugger now. It has basic stepping, breaking, and
  printing commands, that work like GDB. Activate it by running the GJS console
  interpreter with the -d or --debugger flag before the name of the JS program
  on the command line.

- New API for programs that embed GJS: gjs_context_setup_debugger_console().
  To integrate the debugger into programs that embed the GJS interpreter, call
  this before executing the JS program.

- New JavaScript features! This version of GJS is based on SpiderMonkey 60, an
  upgrade from the previous ESR (Extended Support Release) of SpiderMonkey 52.
  Here are the highlights of the new JavaScript features.
  For more information, look them up on MDN or devdocs.io.

  * New syntax
    + `for await (... of ...)` syntax is used for async iteration.
    + The rest operator is now supported in object destructuring: e.g.
      `({a, b, ...cd} = {a: 1, b: 2, c: 3, d: 4});`
    + The spread operator is now supported in object literals: e.g.
      `mergedObject = {...obj1, ...obj2};`
    + Generator methods can now be async, using the `async function*` syntax,
      or `async* f() {...}` method shorthand.
    + It's now allowed to omit the variable binding from a catch statement, if
      you don't need to access the thrown exception: `try {...} catch {}`

  * New APIs
    + Promise.prototype.finally(), popular in many third-party Promise
      libraries, is now available natively.
    + String.prototype.toLocaleLowerCase() and
      String.prototype.toLocaleUpperCase() now take an optional locale or
      array of locales.
    + Intl.PluralRules is now available.
    + Intl.NumberFormat.protoype.formatToParts() is now available.
    + Intl.Collator now has a caseFirst option.
    + Intl.DateTimeFormat now has an hourCycle option.

  * New behaviour
    + There are a lot of minor behaviour changes as SpiderMonkey's JS
      implementation conforms ever closer to ECMAScript standards. For complete
      information, read the Firefox developer release notes:
      https://developer.mozilla.org/en-US/Firefox/Releases/53#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/54#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/55#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/56#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/57#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/58#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/59#JavaScript
      https://developer.mozilla.org/en-US/Firefox/Releases/60#JavaScript

  * Backwards-incompatible changes
    + Conditional catch clauses have been removed, as they were a Mozilla
      extension which will not be standardized. This requires some attention in
      GJS programs, as previously we condoned code like `catch (e if
      e.matches(Gio.IOError, Gio.IOError.EXISTS))`  with a comment in
      overrides/GLib.js, so it's likely this is used in several places.
    + The nonstandard `for each (... in ...)` loop was removed.
    + The nonstandard legacy lambda syntax (`function(x) x*x`) was removed.
    + The nonstandard Mozilla iteration protocol was removed, as well as
      nonstandard Mozilla generators, including the Iterator and StopIteration
      objects, and the Function.prototype.isGenerator() method.
    + Array comprehensions and generator comprehensions have been removed.
    + Several nonstandard methods were removed: ArrayBuffer.slice() (but not
      the standard version, ArrayBuffer.prototype.slice()),
      Date.prototype.toLocaleFormat(), Function.prototype.isGenerator(),
      Object.prototype.watch(), and Object.prototype.unwatch().

- Many of the above backwards-incompatible changes can be caught by scanning
  your source code using https://gitlab.gnome.org/ptomato/moz60tool, or
  https://extensions.gnome.org/extension/1455/spidermonkey-60-migration-validator/

- Deprecation: the custom ByteArray is now discouraged. Instead of ByteArray,
  use Javascript's native Uint8Array. The ByteArray module still contains
  functions for converting between byte arrays, strings, and GLib.Bytes
  instances.

  The old ByteArray will continue to work as before, except that Uint8Array
  will now be returned from introspected functions that previously returned a
  ByteArray. To keep your old code working, change this:

      let byteArray = functionThatReturnsByteArray();

  to this:

      let byteArray = new ByteArray.ByteArray(functionThatReturnsByteArray());

  To port to the new code:

  * ByteArray.ByteArray -> Uint8Array
  * ByteArray.fromArray() -> Uint8Array.from()
  * ByteArray.ByteArray.prototype.toString() -> ByteArray.toString()
  * ByteArray.ByteArray.prototype.toGBytes() -> ByteArray.toGBytes()
  * ByteArray.fromString(), ByteArray.fromGBytes() remain the same

  * Unlike ByteArray, Uint8Array's length is fixed. Assigning an element past
    the end of a ByteArray would lengthen the array. Now, it is ignored.
    Instead use Uint8Array.of(), for example, this code:

        let a = ByteArray.fromArray([97, 98, 99, 100]);
        a[4] = 101;

    should be replaced by this code:

        let a = Uint8Array.from([97, 98, 99, 100]);
        a = Uint8Array.of(...a, 101);

    The length of the byte array must be set at creation time. This code will
    not work anymore:

        let a = new ByteArray.ByteArray();
        a[0] = 255;

    Instead, use "new Uint8Array(1)" to reserve the correct length.

- Closed bugs and merge requests:

  * Run tests using real software [#178, !192, Claudio André]
  * Script tests are missing some errors [#179, !192, Claudio André]
  * Create a '--disable-readline' option and use it [!196, Claudio André]
  * CI: stop using Fedora for clang builds [!198, Claudio André]
  * Expose GObject static property symbols. [!197, Evan Welsh]
  * CI fixes [!200, Claudio André]
  * Docker images creation [!201, Claudio André]
  * Get Docker images built and stored in GJS registry [#185, !203, !208,
    Claudio André, Philip Chimento]
  * Clear the static analysis image a bit more [!205, Claudio André]
  * Rename the packaging job to flatpak [!210, Claudio André]
  * Create SpiderMonkey 60 docker images [!202, Claudio André]
  * Debugger [#110, !204, Philip Chimento]
  * Add convenience g_object_set() replacement [!213, Florian Müllner]
  * Add dependencies of the real tests (examples) [!215, Claudio André]
  * CWE-126 [#174, !218, Philip Chimento]
  * gjs no longer builds after recent autoconf-archive updates [#149, !217,
    Philip Chimento]
  * gjs-1.52.0 fails to compile against x86_64 musl systems [#132, !214, Philip
    Chimento]
  * Run the GTK real tests (recently added) [!212, Claudio André]
  * Fix thorough tests failures [!220, Philip Chimento]
  * Port to SpiderMonkey 60 [#161, !199, Philip Chimento]
  * Replace ByteArray with native ES6 TypedArray [#5, !199, Philip Chimento]
  * Overriding GInterface properties broke [#186, !216, Florian Müllner, Philip
    Chimento]
  * Avoid segfault when checking for GByteArray [!221, Florian Müllner]

- Various build fixes [Philip Chimento]
  • Loading branch information
alarixnia committed Nov 5, 2020
1 parent 20b31fa commit c0f57b3
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 89 deletions.
4 changes: 2 additions & 2 deletions lang/gjs/DESCR
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Gjs is a JavaScript binding for GNOME. It's mainly based on
Spidermonkey JavaScript engine and the GObject introspection
Gjs is a Javascript binding for GNOME. It's mainly based on
Spidermonkey javascript engine and the GObject introspection
framework.
34 changes: 11 additions & 23 deletions lang/gjs/Makefile
Original file line number Diff line number Diff line change
@@ -1,45 +1,33 @@
# $NetBSD: Makefile,v 1.5 2020/08/17 20:17:33 leot Exp $
# $NetBSD: Makefile,v 1.6 2020/11/05 17:12:00 nia Exp $

DISTNAME= gjs-1.53.4
PKGREVISION= 3
DISTNAME= gjs-1.64.3
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gjs/1.53/}
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/gjs/${PKGVERSION_NOREV:R}/}
EXTRACT_SUFX= .tar.xz

MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://live.gnome.org/Gjs
COMMENT= Javascript binding for GNOME based on Spidermonkey
LICENSE= mit

BUILD_DEPENDS+= autoconf-archive-[0-9]*:../../devel/autoconf-archive

GNU_CONFIGURE= yes
USE_LIBTOOL= yes
USE_TOOLS+= autoconf autoreconf automake
USE_TOOLS+= gmake pkg-config
USE_TOOLS+= pkg-config
USE_LANGUAGES= c c++

PKGCONFIG_OVERRIDE+= gjs-1.0.pc.in

CONFIGURE_ARGS+= --disable-profiler
CONFIGURE_ARGS+= --prefix=${PREFIX}

LDFLAGS.NetBSD+= ${X11_LDFLAGS}

# Needed by the Javascript JIT used in gjs
NOT_PAX_MPROTECT_SAFE+= bin/gjs-console
NOT_PAX_MPROTECT_SAFE+= bin/gjs
MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/output/gjs@sha:${WRKSRC}/output/gjs-jsapi@sta:${WRKSRC}/output/gjs-console@exe
MESON_ARGS+= -Dinstalled_tests=false

pre-configure:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} autoreconf -vfi
PKGCONFIG_OVERRIDE+= output/meson-private/gjs-1.0.pc
PKGCONFIG_OVERRIDE_STAGE= post-configure

.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/gobject-introspection/buildlink3.mk"
.include "../../devel/libffi/buildlink3.mk"
.include "../../devel/meson/build.mk"
.include "../../graphics/cairo-gobject/buildlink3.mk"
.include "../../graphics/gdk-pixbuf2/buildlink3.mk"
.include "../../lang/python/extension.mk"
.include "../../lang/spidermonkey52/buildlink3.mk"
BUILDLINK_API_DEPENDS.mozjs68+= mozjs68>=68.6.0nb6
.include "../../lang/mozjs68/buildlink3.mk"
.include "../../sysutils/dbus-glib/buildlink3.mk"
.include "../../x11/gtk3/buildlink3.mk"
.include "../../mk/readline.buildlink3.mk"
Expand Down
9 changes: 6 additions & 3 deletions lang/gjs/PLIST
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
@comment $NetBSD: PLIST,v 1.1 2019/10/06 15:50:31 fox Exp $
@comment $NetBSD: PLIST,v 1.2 2020/11/05 17:12:00 nia Exp $
bin/gjs
bin/gjs-console
include/gjs-1.0/gjs/context.h
include/gjs-1.0/gjs/coverage.h
include/gjs-1.0/gjs/error-types.h
include/gjs-1.0/gjs/gjs.h
include/gjs-1.0/gjs/macros.h
include/gjs-1.0/gjs/mem.h
include/gjs-1.0/gjs/profiler.h
include/gjs-1.0/util/error.h
lib/gjs/girepository-1.0/GjsPrivate-1.0.typelib
lib/libgjs.la
lib/libgjs.so
lib/libgjs.so.0
lib/libgjs.so.0.0.0
lib/pkgconfig/gjs-1.0.pc
share/gjs-1.0/lsan/lsan.supp
share/gjs-1.0/valgrind/gjs.supp
6 changes: 3 additions & 3 deletions lang/gjs/buildlink3.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.3 2020/08/17 20:17:33 leot Exp $
# $NetBSD: buildlink3.mk,v 1.4 2020/11/05 17:12:00 nia Exp $

BUILDLINK_TREE+= gjs

Expand All @@ -7,11 +7,11 @@ GJS_BUILDLINK3_MK:=

BUILDLINK_API_DEPENDS.gjs+= gjs>=1.53.4
BUILDLINK_ABI_DEPENDS.gjs?= gjs>=1.53.4nb3
BUILDLINK_PKGSRCDIR.gjs?= ../../lang/gjs
BUILDLINK_PKGSRCDIR.gjs?= ../../wip/gjs

.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/gobject-introspection/buildlink3.mk"
.include "../../lang/spidermonkey52/buildlink3.mk"
.include "../../lang/mozjs68/buildlink3.mk"
.include "../../graphics/cairo-gobject/buildlink3.mk"
.include "../../sysutils/dbus-glib/buildlink3.mk"
.endif # GJS_BUILDLINK3_MK
Expand Down
13 changes: 6 additions & 7 deletions lang/gjs/distinfo
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
$NetBSD: distinfo,v 1.2 2020/03/12 22:53:12 wiz Exp $
$NetBSD: distinfo,v 1.3 2020/11/05 17:12:00 nia Exp $

SHA1 (gjs-1.53.4.tar.xz) = 7193dffbc30e08fec94bc315feeb41bfdaa67c64
RMD160 (gjs-1.53.4.tar.xz) = 1263754399afd24e0522d67241685192574d4e35
SHA512 (gjs-1.53.4.tar.xz) = 5876a8912699fcb22bdfe678a5c9d9893be9dc5b2242160985dd6491c1b4c6148fd4d57d62a9be9c98186176440cf9f99239f8be6b57126cb077c3f90aeb8e2e
Size (gjs-1.53.4.tar.xz) = 635936 bytes
SHA1 (patch-Makefile.am) = 74f02a764cb9f12605c4cccf61dd65bda8027414
SHA1 (patch-configure.ac) = acd8d6e1546c14a636478da2a557cef4bdbc146a
SHA1 (gjs-1.64.3.tar.xz) = f3a6372321cda99f78feaf3ebdc6391532741f67
RMD160 (gjs-1.64.3.tar.xz) = cf7057847308b17f39d348dc952feb0bce20a1a8
SHA512 (gjs-1.64.3.tar.xz) = 9d92e52a7fef07853f3beb181798f89deb60b97b928d916cd827c99a6ab8f83abf7c352a1aa46be476a50e2efadfaf09befa54ccab0d51b0ac7127f2fe794801
Size (gjs-1.64.3.tar.xz) = 422436 bytes
SHA1 (patch-tools_run__iwyu.sh) = a03e6cc832d41c63c81448332e6ee822ff809a41
27 changes: 0 additions & 27 deletions lang/gjs/patches/patch-Makefile.am

This file was deleted.

24 changes: 0 additions & 24 deletions lang/gjs/patches/patch-configure.ac

This file was deleted.

0 comments on commit c0f57b3

Please sign in to comment.