ikalnytskyi / gnome-shell-extension-icon-hider

Icon Hider is a gnome-shell extension for managing status area items.
Other
31 stars 11 forks source link

Not compatible with gjs >= 1.53.90 #35

Closed brunelli closed 5 years ago

brunelli commented 5 years ago

Trying to launch the extension preferences dialog gives the following:

SyntaxError: missing ( after for

Stack trace:
  _getExtensionPrefsModule@resource:///org/gnome/shell/extensionPrefs/main.js:76:13
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  _selectExtension@resource:///org/gnome/shell/extensionPrefs/main.js:91:31
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  _onCommandLine@resource:///org/gnome/shell/extensionPrefs/main.js:244:17
  wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
  main@resource:///org/gnome/shell/extensionPrefs/main.js:398:5
  @<main>:1:43
theychx commented 5 years ago

That's odd, it's working for me (Debian Sid). Is Icon Hider the only extension where this is happening?

brunelli commented 5 years ago

GSConnect was not working either, and this is the only other extension I have installed.

Maybe it can be related with Arch's packaging of gnome-shell?

brunelli commented 5 years ago

Ok, it's related to gjs.

Debian Sid has gjs 1.52.3, while Arch Linux has gjs 1.54.1.

This may be related.

Fortunately, it's easy to fix! Just replace code like this... for each (let k in [...]) ...with code like this: for (let k of [...])

theychx commented 5 years ago

Cool, thanks. I'll try to make a hotfix.

brunelli commented 5 years ago

I can confirm the extension works as expected after changing all for each (... in ...) to for (... of ...).

The previous syntax was removed in gjs 1.53.90.

theychx commented 5 years ago

Cheers, but those changes are listed as backwards-incompatible, which makes this a bit tricky.

theychx commented 5 years ago

but those changes are listed as backwards-incompatible

Oh, it was the other way around. Haha :man_facepalming: