Skip to content

Extension incompatible with GNOME ver ≥45 #5

Description

@kon-mtal

Running 255.4-2-arch with GNOME Shell 46.0

The extension is not compatible with GNOME 46.0 and from what I can deduce from the GJS guide it had not been compatible with GNOME since 45.0.

From the information I have collected:

SyntaxError: import declarations may only appear at top level of a module @ resource:///org/gnome/Shell/Extensions/js/misc/extensionUtils.js:4:0

Stack trace:
@file:///home/user/.local/share/gnome-shell/extensions/pingindic@xynium.github.com/prefs.js:6:24
_init/GLib.MainLoop.prototype.runAsync/</<@resource:///org/gnome/gjs/modules/core/overrides/GLib.js:266:34

Per the GJS guide:

GNOME Shell and Extensions use ESModules as of GNOME 45.

Imports in your extension's directory can be imported using a relative path. For example, if the module above were placed in example@gjs.guide/utils.js the script above would be available at ./utils.js.

GNOME Shell modules are bundled in a GResource and the import statement must use a resource:// URI. Note that extension code (i.e. extension.js) uses the base path resource:///org/gnome/shell/js/, while preferences (i.e. prefs.js) uses the base path resource:///org/gnome/Shell/Extensions/js/.

So, the import method probably needs to be modified before further incompatibilites (if any) can be identified.
edited

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions